using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using DeviousTraps.NetcodePatcher; using DeviousTraps.src.MouseTrap; using DeviousTraps.src.SoundCannon; using GameNetcodeStuff; using HarmonyLib; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Extras; using LethalLib.Modules; using Microsoft.CodeAnalysis; using On; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.UI; [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("Adds an array of deadly traps")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+f7b37d8c67d8ff3ad02c1f3ea63efc1193172767")] [assembly: AssemblyProduct("DeviousTraps")] [assembly: AssemblyTitle("DeviousTraps")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace DeviousTraps { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("DeviousTraps", "DeviousTraps", "1.6.0")] public class Plugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__19_0; public static Func <>9__19_1; public static Func <>9__19_2; public static Func <>9__19_3; public static Func <>9__19_4; public static hook_LoadNewLevel <>9__20_0; internal AnimationCurve b__19_0(SelectableLevel _) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)SawSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); } internal AnimationCurve b__19_1(SelectableLevel _) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)FlameSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); } internal AnimationCurve b__19_2(SelectableLevel _) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)LRADSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); } internal AnimationCurve b__19_3(SelectableLevel _) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)MouseTrapSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); } internal AnimationCurve b__19_4(SelectableLevel _) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)PlasmaSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); } internal void b__20_0(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); try { if (ImpactFXState.Instances != null) { foreach (ImpactFXState instance in ImpactFXState.Instances) { if ((Object)(object)instance != (Object)null) { Object.Destroy((Object)(object)instance); } } ImpactFXState.Instances.Clear(); } } catch (Exception ex) { Debug.LogError((object)("Devious Traps: LRAD FX clear error: " + ex.ToString() + " this is only an issue if you see red noise fx on your screen or if you are deaf. Otherwise this is OK.")); } try { if (MouseTrap.instances == null) { return; } foreach (MouseTrap instance2 in MouseTrap.instances) { if ((Object)(object)instance2 != (Object)null) { if (Object.op_Implicit((Object)(object)((Component)instance2).gameObject)) { Object.Destroy((Object)(object)((Component)instance2).gameObject); } else { Object.Destroy((Object)(object)instance2); } } } MouseTrap.instances.Clear(); } catch (Exception ex2) { Debug.LogError((object)("Devious Traps: Mouse Trap clear error: " + ex2.ToString() + " this is only an issue if you have mouse traps attached to you and you can't remove them. Otherwise this is OK.")); } } } public static Harmony _harmony; public static ManualLogSource Logger; public static AssetBundle TrapBundle; public static GameObject SawTurretPrefab; public static GameObject SawPrefab; public static SpawnableMapObjectDef SawTurretDef; public static GameObject FlameTurretPrefab; public static SpawnableMapObjectDef FlameTurretDef; public static GameObject LRADTurretPrefab; public static GameObject LRADBlastPrefab; public static GameObject LRADImpactPrefab; public static SpawnableMapObjectDef LRADTurretDef; public static GameObject MouseTrapPrefab; public static GameObject MouseTrapSpawnerPrefab; public static SpawnableMapObjectDef MouseTrapDef; public static GameObject PlasmaTurretPrefab; public static GameObject PlasmaBallPrefab; public static SpawnableMapObjectDef PlasmaTurretDef; public static ConfigEntry SawSpawnrate; public static ConfigEntry SawDmgMult; public static ConfigEntry SawTargetRange; public static ConfigEntry SawWindupTime; public static ConfigEntry SawFirerate; public static ConfigEntry SawAmmo; public static ConfigEntry SawReloadTime; public static ConfigEntry SawLaunchSpeed; public static ConfigEntry SawVolume; public static ConfigEntry SawRotationSpeed; public static ConfigEntry FlameSpawnrate; public static ConfigEntry FlameDmgMult; public static ConfigEntry FlameTargetRange; public static ConfigEntry FlameRisingTime; public static ConfigEntry FlameRestingTime; public static ConfigEntry FlameRotationSpeed; public static ConfigEntry FlameSpinningTime; public static ConfigEntry FlameVolume; public static ConfigEntry SmokeCooldown; public static ConfigEntry LRADSpawnrate; public static ConfigEntry LRADChargeTime; public static ConfigEntry LRADReloadTime; public static ConfigEntry LRADTargetRange; public static ConfigEntry LRADDmgMult; public static ConfigEntry LRADDisorientPeriod; public static ConfigEntry LRADDizzyMult; public static ConfigEntry LRADDrunknessMult; public static ConfigEntry LRADFXMult; public static ConfigEntry LRADVolume; public static ConfigEntry LRADFXVolume; public static ConfigEntry LRADProjectileSpeed; public static ConfigEntry LRADRotationSpeed; public static ConfigEntry MouseTrapSpawnrate; public static ConfigEntry BigMTrapChance; public static ConfigEntry GiantMTrapChance; public static ConfigEntry MTrapScrapBaitForgiveness; public static ConfigEntry SmallMTrapDmg; public static ConfigEntry BigMTrapDmg; public static ConfigEntry GiantMTrapDmg; public static ConfigEntry SmallMTrapAttaches; public static ConfigEntry AttachmentWepRequired; public static ConfigEntry MTrapCanBeDisabled; public static ConfigEntry MTrapWhitelist; public static ConfigEntry PlasmaSpawnrate; public static ConfigEntry PlasmaDamage; public static ConfigEntry PlasmaReloadTime; public static ConfigEntry PlasmaWindupTime; public static ConfigEntry PlasmaTargetRange; public static ConfigEntry PlasmaBallsPerBurst; public static ConfigEntry PlasmaBurstQuantity; public static ConfigEntry PlasmaProjDelay; public static ConfigEntry PlasmaBurstDelay; public static ConfigEntry PlasmaProjectileSpeed; public static ConfigEntry PlasmaRotationSpeed; public static ConfigEntry PlasmaBallLifetime; public static ConfigEntry PlasmaTurretVolume; public void LogIfDebugBuild(string text) { Logger.LogInfo((object)text); } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; 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); } } } SawTurretPrefab = TrapBundle.LoadAsset("SawTurretTrap"); SawPrefab = TrapBundle.LoadAsset("SawBlade"); SawTurretDef = TrapBundle.LoadAsset("SawTurretDef"); FlameTurretPrefab = TrapBundle.LoadAsset("FlameTurret"); FlameTurretDef = TrapBundle.LoadAsset("FlamePillarDef"); LRADTurretPrefab = TrapBundle.LoadAsset("LRAD"); LRADTurretDef = TrapBundle.LoadAsset("SoundTurretDef"); LRADBlastPrefab = TrapBundle.LoadAsset("SoundWave"); LRADImpactPrefab = TrapBundle.LoadAsset("ImpactFX"); MouseTrapPrefab = TrapBundle.LoadAsset("MouseTrap"); MouseTrapDef = TrapBundle.LoadAsset("MouseTrapDef"); MouseTrapSpawnerPrefab = TrapBundle.LoadAsset("MouseTrapSpawner"); PlasmaTurretPrefab = TrapBundle.LoadAsset("PlasmaTurret"); PlasmaTurretDef = TrapBundle.LoadAsset("PlasmaTurretDef"); PlasmaBallPrefab = TrapBundle.LoadAsset("PlasmaBall"); Random.InitState((int)DateTime.Now.Ticks); MapObjects.RegisterMapObject(SawTurretDef, (LevelTypes)(-1), (Func)delegate { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num9 = 0; double num10 = 4.8 * (double)SawSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num9, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num10, 61f, 61f, 0.015f * (float)num10, 0f) }); }); MapObjects.RegisterMapObject(FlameTurretDef, (LevelTypes)(-1), (Func)delegate { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num7 = 0; double num8 = 4.8 * (double)FlameSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num7, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num8, 61f, 61f, 0.015f * (float)num8, 0f) }); }); MapObjects.RegisterMapObject(LRADTurretDef, (LevelTypes)(-1), (Func)delegate { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num5 = 0; double num6 = 4.8 * (double)LRADSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num5, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num6, 61f, 61f, 0.015f * (float)num6, 0f) }); }); MapObjects.RegisterMapObject(MouseTrapDef, (LevelTypes)(-1), (Func)delegate { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num3 = 0; double num4 = 4.8 * (double)MouseTrapSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num3, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num4, 61f, 61f, 0.015f * (float)num4, 0f) }); }); MapObjects.RegisterMapObject(PlasmaTurretDef, (LevelTypes)(-1), (Func)delegate { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown int num = 0; double num2 = 4.8 * (double)PlasmaSpawnrate.Value; return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f), new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f) }); }); NetworkPrefabs.RegisterNetworkPrefab(SawPrefab); NetworkPrefabs.RegisterNetworkPrefab(SawTurretPrefab); NetworkPrefabs.RegisterNetworkPrefab(FlameTurretPrefab); NetworkPrefabs.RegisterNetworkPrefab(LRADTurretPrefab); NetworkPrefabs.RegisterNetworkPrefab(LRADBlastPrefab); NetworkPrefabs.RegisterNetworkPrefab(LRADImpactPrefab); NetworkPrefabs.RegisterNetworkPrefab(MouseTrapPrefab); NetworkPrefabs.RegisterNetworkPrefab(MouseTrapSpawnerPrefab); NetworkPrefabs.RegisterNetworkPrefab(PlasmaTurretPrefab); NetworkPrefabs.RegisterNetworkPrefab(PlasmaBallPrefab); Hooks(); } public void Hooks() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__20_0; if (obj == null) { hook_LoadNewLevel val = delegate(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); try { if (ImpactFXState.Instances != null) { foreach (ImpactFXState instance in ImpactFXState.Instances) { if ((Object)(object)instance != (Object)null) { Object.Destroy((Object)(object)instance); } } ImpactFXState.Instances.Clear(); } } catch (Exception ex) { Debug.LogError((object)("Devious Traps: LRAD FX clear error: " + ex.ToString() + " this is only an issue if you see red noise fx on your screen or if you are deaf. Otherwise this is OK.")); } try { if (MouseTrap.instances != null) { foreach (MouseTrap instance2 in MouseTrap.instances) { if ((Object)(object)instance2 != (Object)null) { if (Object.op_Implicit((Object)(object)((Component)instance2).gameObject)) { Object.Destroy((Object)(object)((Component)instance2).gameObject); } else { Object.Destroy((Object)(object)instance2); } } } MouseTrap.instances.Clear(); } } catch (Exception ex2) { Debug.LogError((object)("Devious Traps: Mouse Trap clear error: " + ex2.ToString() + " this is only an issue if you have mouse traps attached to you and you can't remove them. Otherwise this is OK.")); } }; <>c.<>9__20_0 = val; obj = (object)val; } RoundManager.LoadNewLevel += (hook_LoadNewLevel)obj; } public void bindVars() { //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Expected O, but got Unknown //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_082d: Expected O, but got Unknown //IL_0833: Expected O, but got Unknown //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Expected O, but got Unknown //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0846: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Expected O, but got Unknown //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Expected O, but got Unknown //IL_0863: Expected O, but got Unknown //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Expected O, but got Unknown //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Expected O, but got Unknown //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Expected O, but got Unknown //IL_0893: Expected O, but got Unknown //IL_088e: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Expected O, but got Unknown //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_089e: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Expected O, but got Unknown //IL_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Expected O, but got Unknown //IL_08c3: Expected O, but got Unknown //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Expected O, but got Unknown //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Expected O, but got Unknown //IL_08e2: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Expected O, but got Unknown //IL_08f3: Expected O, but got Unknown //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Expected O, but got Unknown //IL_08fa: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Expected O, but got Unknown //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Expected O, but got Unknown //IL_0924: Expected O, but got Unknown //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Expected O, but got Unknown //IL_092b: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Expected O, but got Unknown //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Expected O, but got Unknown //IL_0955: Expected O, but got Unknown //IL_0950: Unknown result type (might be due to invalid IL or missing references) //IL_0957: Expected O, but got Unknown //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Expected O, but got Unknown //IL_0975: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Expected O, but got Unknown //IL_0986: Expected O, but got Unknown //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Expected O, but got Unknown //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: Expected O, but got Unknown //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Expected O, but got Unknown //IL_09b7: Expected O, but got Unknown //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Expected O, but got Unknown //IL_0a02: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Expected O, but got Unknown //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Expected O, but got Unknown //IL_0a2c: Expected O, but got Unknown //IL_0a27: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Expected O, but got Unknown //IL_0a33: Unknown result type (might be due to invalid IL or missing references) //IL_0a38: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Expected O, but got Unknown //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Expected O, but got Unknown //IL_0a5d: Expected O, but got Unknown //IL_0a58: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Expected O, but got Unknown //IL_0a64: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Expected O, but got Unknown //IL_0a7d: Unknown result type (might be due to invalid IL or missing references) //IL_0a88: Expected O, but got Unknown //IL_0a8e: Expected O, but got Unknown //IL_0a89: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Expected O, but got Unknown //IL_0a95: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Expected O, but got Unknown //IL_0aae: Unknown result type (might be due to invalid IL or missing references) //IL_0ab9: Expected O, but got Unknown //IL_0abf: Expected O, but got Unknown //IL_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0ac1: Expected O, but got Unknown //IL_0ac6: Unknown result type (might be due to invalid IL or missing references) //IL_0acb: Unknown result type (might be due to invalid IL or missing references) //IL_0ad3: Unknown result type (might be due to invalid IL or missing references) //IL_0ade: Expected O, but got Unknown //IL_0adf: Unknown result type (might be due to invalid IL or missing references) //IL_0aea: Expected O, but got Unknown //IL_0af0: Expected O, but got Unknown //IL_0aeb: Unknown result type (might be due to invalid IL or missing references) //IL_0af2: Expected O, but got Unknown //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0afc: Unknown result type (might be due to invalid IL or missing references) //IL_0b04: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Expected O, but got Unknown //IL_0b10: Unknown result type (might be due to invalid IL or missing references) //IL_0b1b: Expected O, but got Unknown //IL_0b21: Expected O, but got Unknown //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b23: Expected O, but got Unknown //IL_0b28: Unknown result type (might be due to invalid IL or missing references) //IL_0b2d: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Expected O, but got Unknown //IL_0b3d: Unknown result type (might be due to invalid IL or missing references) //IL_0b48: Expected O, but got Unknown //IL_0b4e: Expected O, but got Unknown //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b50: Expected O, but got Unknown //IL_0b55: Unknown result type (might be due to invalid IL or missing references) //IL_0b5a: Unknown result type (might be due to invalid IL or missing references) //IL_0b62: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Expected O, but got Unknown //IL_0b6e: Unknown result type (might be due to invalid IL or missing references) //IL_0b79: Expected O, but got Unknown //IL_0b7f: Expected O, but got Unknown //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b81: Expected O, but got Unknown //IL_0b86: Unknown result type (might be due to invalid IL or missing references) //IL_0b8b: Unknown result type (might be due to invalid IL or missing references) //IL_0b93: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Expected O, but got Unknown //IL_0b9f: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Expected O, but got Unknown //IL_0bb0: Expected O, but got Unknown //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bb2: Expected O, but got Unknown //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0bbc: Unknown result type (might be due to invalid IL or missing references) //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bcf: Expected O, but got Unknown //IL_0bd5: Expected O, but got Unknown //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_0bd7: Expected O, but got Unknown //IL_0c2c: Unknown result type (might be due to invalid IL or missing references) //IL_0c31: Unknown result type (might be due to invalid IL or missing references) //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c44: Expected O, but got Unknown //IL_0c45: Unknown result type (might be due to invalid IL or missing references) //IL_0c50: Expected O, but got Unknown //IL_0c56: Expected O, but got Unknown //IL_0c51: Unknown result type (might be due to invalid IL or missing references) //IL_0c58: Expected O, but got Unknown //IL_0c5d: Unknown result type (might be due to invalid IL or missing references) //IL_0c62: Unknown result type (might be due to invalid IL or missing references) //IL_0c6a: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Expected O, but got Unknown //IL_0c76: Unknown result type (might be due to invalid IL or missing references) //IL_0c81: Expected O, but got Unknown //IL_0c87: Expected O, but got Unknown //IL_0c82: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Expected O, but got Unknown //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0c9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ca6: Expected O, but got Unknown //IL_0ca7: Unknown result type (might be due to invalid IL or missing references) //IL_0cb2: Expected O, but got Unknown //IL_0cb8: Expected O, but got Unknown //IL_0cb3: Unknown result type (might be due to invalid IL or missing references) //IL_0cba: Expected O, but got Unknown //IL_0cbf: Unknown result type (might be due to invalid IL or missing references) //IL_0cc4: Unknown result type (might be due to invalid IL or missing references) //IL_0ccc: Unknown result type (might be due to invalid IL or missing references) //IL_0cd7: Expected O, but got Unknown //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Expected O, but got Unknown //IL_0ce9: Expected O, but got Unknown //IL_0ce4: Unknown result type (might be due to invalid IL or missing references) //IL_0ceb: Expected O, but got Unknown //IL_0cf0: Unknown result type (might be due to invalid IL or missing references) //IL_0cf5: Unknown result type (might be due to invalid IL or missing references) //IL_0cfd: Unknown result type (might be due to invalid IL or missing references) //IL_0d08: Expected O, but got Unknown //IL_0d09: Unknown result type (might be due to invalid IL or missing references) //IL_0d14: Expected O, but got Unknown //IL_0d1a: Expected O, but got Unknown //IL_0d15: Unknown result type (might be due to invalid IL or missing references) //IL_0d1c: Expected O, but got Unknown //IL_0d21: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Unknown result type (might be due to invalid IL or missing references) //IL_0d39: Expected O, but got Unknown //IL_0d3a: Unknown result type (might be due to invalid IL or missing references) //IL_0d45: Expected O, but got Unknown //IL_0d4b: Expected O, but got Unknown //IL_0d46: Unknown result type (might be due to invalid IL or missing references) //IL_0d4d: Expected O, but got Unknown //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d5f: Unknown result type (might be due to invalid IL or missing references) //IL_0d6a: Expected O, but got Unknown //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d76: Expected O, but got Unknown //IL_0d7c: Expected O, but got Unknown //IL_0d77: Unknown result type (might be due to invalid IL or missing references) //IL_0d7e: Expected O, but got Unknown //IL_0d83: Unknown result type (might be due to invalid IL or missing references) //IL_0d88: Unknown result type (might be due to invalid IL or missing references) //IL_0d90: Unknown result type (might be due to invalid IL or missing references) //IL_0d9b: Expected O, but got Unknown //IL_0d9c: Unknown result type (might be due to invalid IL or missing references) //IL_0da7: Expected O, but got Unknown //IL_0dad: Expected O, but got Unknown //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0daf: Expected O, but got Unknown //IL_0db4: Unknown result type (might be due to invalid IL or missing references) //IL_0db9: Unknown result type (might be due to invalid IL or missing references) //IL_0dc1: Unknown result type (might be due to invalid IL or missing references) //IL_0dcc: Expected O, but got Unknown //IL_0dcd: Unknown result type (might be due to invalid IL or missing references) //IL_0dd8: Expected O, but got Unknown //IL_0dde: Expected O, but got Unknown //IL_0dd9: Unknown result type (might be due to invalid IL or missing references) //IL_0de0: Expected O, but got Unknown //IL_0de5: Unknown result type (might be due to invalid IL or missing references) //IL_0dea: Unknown result type (might be due to invalid IL or missing references) //IL_0df2: Unknown result type (might be due to invalid IL or missing references) //IL_0dfd: Expected O, but got Unknown //IL_0dfe: Unknown result type (might be due to invalid IL or missing references) //IL_0e09: Expected O, but got Unknown //IL_0e0f: Expected O, but got Unknown //IL_0e0a: Unknown result type (might be due to invalid IL or missing references) //IL_0e11: Expected O, but got Unknown //IL_0e16: Unknown result type (might be due to invalid IL or missing references) //IL_0e1b: Unknown result type (might be due to invalid IL or missing references) //IL_0e23: Unknown result type (might be due to invalid IL or missing references) //IL_0e2e: Expected O, but got Unknown //IL_0e2f: Unknown result type (might be due to invalid IL or missing references) //IL_0e3a: Expected O, but got Unknown //IL_0e40: Expected O, but got Unknown //IL_0e3b: Unknown result type (might be due to invalid IL or missing references) //IL_0e42: Expected O, but got Unknown //IL_0e47: Unknown result type (might be due to invalid IL or missing references) //IL_0e4c: Unknown result type (might be due to invalid IL or missing references) //IL_0e54: Unknown result type (might be due to invalid IL or missing references) //IL_0e5f: Expected O, but got Unknown //IL_0e60: Unknown result type (might be due to invalid IL or missing references) //IL_0e6b: Expected O, but got Unknown //IL_0e71: Expected O, but got Unknown //IL_0e6c: Unknown result type (might be due to invalid IL or missing references) //IL_0e73: Expected O, but got Unknown //IL_0e78: Unknown result type (might be due to invalid IL or missing references) //IL_0e7d: Unknown result type (might be due to invalid IL or missing references) //IL_0e85: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Expected O, but got Unknown //IL_0e91: Unknown result type (might be due to invalid IL or missing references) //IL_0e9c: Expected O, but got Unknown //IL_0ea2: Expected O, but got Unknown //IL_0e9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ea4: Expected O, but got Unknown //IL_0f11: Unknown result type (might be due to invalid IL or missing references) //IL_0f16: Unknown result type (might be due to invalid IL or missing references) //IL_0f1e: Unknown result type (might be due to invalid IL or missing references) //IL_0f29: Expected O, but got Unknown //IL_0f2a: Unknown result type (might be due to invalid IL or missing references) //IL_0f35: Expected O, but got Unknown //IL_0f3b: Expected O, but got Unknown //IL_0f36: Unknown result type (might be due to invalid IL or missing references) //IL_0f3d: Expected O, but got Unknown //IL_0f42: Unknown result type (might be due to invalid IL or missing references) //IL_0f47: Unknown result type (might be due to invalid IL or missing references) //IL_0f4f: Unknown result type (might be due to invalid IL or missing references) //IL_0f5a: Expected O, but got Unknown //IL_0f5b: Unknown result type (might be due to invalid IL or missing references) //IL_0f66: Expected O, but got Unknown //IL_0f6c: Expected O, but got Unknown //IL_0f67: Unknown result type (might be due to invalid IL or missing references) //IL_0f6e: Expected O, but got Unknown //IL_0f73: Unknown result type (might be due to invalid IL or missing references) //IL_0f78: Unknown result type (might be due to invalid IL or missing references) //IL_0f80: Unknown result type (might be due to invalid IL or missing references) //IL_0f8b: Expected O, but got Unknown //IL_0f8c: Unknown result type (might be due to invalid IL or missing references) //IL_0f97: Expected O, but got Unknown //IL_0f9d: Expected O, but got Unknown //IL_0f98: Unknown result type (might be due to invalid IL or missing references) //IL_0f9f: Expected O, but got Unknown //IL_0fa4: Unknown result type (might be due to invalid IL or missing references) //IL_0fa9: Unknown result type (might be due to invalid IL or missing references) //IL_0fb1: Unknown result type (might be due to invalid IL or missing references) //IL_0fbc: Expected O, but got Unknown //IL_0fbd: Unknown result type (might be due to invalid IL or missing references) //IL_0fc8: Expected O, but got Unknown //IL_0fce: Expected O, but got Unknown //IL_0fc9: Unknown result type (might be due to invalid IL or missing references) //IL_0fd0: Expected O, but got Unknown //IL_0fd5: Unknown result type (might be due to invalid IL or missing references) //IL_0fda: Unknown result type (might be due to invalid IL or missing references) //IL_0fe2: Unknown result type (might be due to invalid IL or missing references) //IL_0fed: Expected O, but got Unknown //IL_0fee: Unknown result type (might be due to invalid IL or missing references) //IL_0ff9: Expected O, but got Unknown //IL_0fff: Expected O, but got Unknown //IL_0ffa: Unknown result type (might be due to invalid IL or missing references) //IL_1001: Expected O, but got Unknown //IL_1006: Unknown result type (might be due to invalid IL or missing references) //IL_100b: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_101e: Expected O, but got Unknown //IL_101f: Unknown result type (might be due to invalid IL or missing references) //IL_102a: Expected O, but got Unknown //IL_1030: Expected O, but got Unknown //IL_102b: Unknown result type (might be due to invalid IL or missing references) //IL_1032: Expected O, but got Unknown //IL_1037: Unknown result type (might be due to invalid IL or missing references) //IL_103c: Unknown result type (might be due to invalid IL or missing references) //IL_1049: Expected O, but got Unknown //IL_1044: Unknown result type (might be due to invalid IL or missing references) //IL_104b: Expected O, but got Unknown //IL_1050: Unknown result type (might be due to invalid IL or missing references) //IL_1055: Unknown result type (might be due to invalid IL or missing references) //IL_1062: Expected O, but got Unknown //IL_105d: Unknown result type (might be due to invalid IL or missing references) //IL_1064: Expected O, but got Unknown //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_107b: Expected O, but got Unknown //IL_1076: Unknown result type (might be due to invalid IL or missing references) //IL_107d: Expected O, but got Unknown //IL_1082: Unknown result type (might be due to invalid IL or missing references) //IL_1087: Unknown result type (might be due to invalid IL or missing references) //IL_1094: Expected O, but got Unknown //IL_108f: Unknown result type (might be due to invalid IL or missing references) //IL_1096: Expected O, but got Unknown //IL_109b: Unknown result type (might be due to invalid IL or missing references) //IL_10a0: Unknown result type (might be due to invalid IL or missing references) //IL_10ad: Expected O, but got Unknown //IL_10a8: Unknown result type (might be due to invalid IL or missing references) //IL_10af: Expected O, but got Unknown //IL_110c: Unknown result type (might be due to invalid IL or missing references) //IL_1111: Unknown result type (might be due to invalid IL or missing references) //IL_1119: Unknown result type (might be due to invalid IL or missing references) //IL_1124: Expected O, but got Unknown //IL_1125: Unknown result type (might be due to invalid IL or missing references) //IL_1130: Expected O, but got Unknown //IL_1136: Expected O, but got Unknown //IL_1131: Unknown result type (might be due to invalid IL or missing references) //IL_1138: Expected O, but got Unknown //IL_113d: Unknown result type (might be due to invalid IL or missing references) //IL_1142: Unknown result type (might be due to invalid IL or missing references) //IL_114a: Unknown result type (might be due to invalid IL or missing references) //IL_1155: Expected O, but got Unknown //IL_1156: Unknown result type (might be due to invalid IL or missing references) //IL_1161: Expected O, but got Unknown //IL_1167: Expected O, but got Unknown //IL_1162: Unknown result type (might be due to invalid IL or missing references) //IL_1169: Expected O, but got Unknown //IL_116e: Unknown result type (might be due to invalid IL or missing references) //IL_1173: Unknown result type (might be due to invalid IL or missing references) //IL_117b: Unknown result type (might be due to invalid IL or missing references) //IL_1186: Expected O, but got Unknown //IL_1187: Unknown result type (might be due to invalid IL or missing references) //IL_1192: Expected O, but got Unknown //IL_1198: Expected O, but got Unknown //IL_1193: Unknown result type (might be due to invalid IL or missing references) //IL_119a: Expected O, but got Unknown //IL_119f: Unknown result type (might be due to invalid IL or missing references) //IL_11a4: Unknown result type (might be due to invalid IL or missing references) //IL_11ac: Unknown result type (might be due to invalid IL or missing references) //IL_11b7: Expected O, but got Unknown //IL_11b8: Unknown result type (might be due to invalid IL or missing references) //IL_11c3: Expected O, but got Unknown //IL_11c9: Expected O, but got Unknown //IL_11c4: Unknown result type (might be due to invalid IL or missing references) //IL_11cb: Expected O, but got Unknown //IL_11d0: Unknown result type (might be due to invalid IL or missing references) //IL_11d5: Unknown result type (might be due to invalid IL or missing references) //IL_11dd: Unknown result type (might be due to invalid IL or missing references) //IL_11e8: Expected O, but got Unknown //IL_11e9: Unknown result type (might be due to invalid IL or missing references) //IL_11f4: Expected O, but got Unknown //IL_11fa: Expected O, but got Unknown //IL_11f5: Unknown result type (might be due to invalid IL or missing references) //IL_11fc: Expected O, but got Unknown //IL_1201: Unknown result type (might be due to invalid IL or missing references) //IL_1206: Unknown result type (might be due to invalid IL or missing references) //IL_120e: Unknown result type (might be due to invalid IL or missing references) //IL_1219: Expected O, but got Unknown //IL_121a: Unknown result type (might be due to invalid IL or missing references) //IL_1225: Expected O, but got Unknown //IL_122b: Expected O, but got Unknown //IL_1226: Unknown result type (might be due to invalid IL or missing references) //IL_122d: Expected O, but got Unknown //IL_1232: Unknown result type (might be due to invalid IL or missing references) //IL_1237: Unknown result type (might be due to invalid IL or missing references) //IL_123f: Unknown result type (might be due to invalid IL or missing references) //IL_124a: Expected O, but got Unknown //IL_124b: Unknown result type (might be due to invalid IL or missing references) //IL_1256: Expected O, but got Unknown //IL_125c: Expected O, but got Unknown //IL_1257: Unknown result type (might be due to invalid IL or missing references) //IL_125e: Expected O, but got Unknown //IL_1263: Unknown result type (might be due to invalid IL or missing references) //IL_1268: Unknown result type (might be due to invalid IL or missing references) //IL_1270: Unknown result type (might be due to invalid IL or missing references) //IL_1277: Expected O, but got Unknown //IL_1278: Unknown result type (might be due to invalid IL or missing references) //IL_1283: Expected O, but got Unknown //IL_1289: Expected O, but got Unknown //IL_1284: Unknown result type (might be due to invalid IL or missing references) //IL_128b: Expected O, but got Unknown //IL_1290: Unknown result type (might be due to invalid IL or missing references) //IL_1295: Unknown result type (might be due to invalid IL or missing references) //IL_129d: Unknown result type (might be due to invalid IL or missing references) //IL_12a4: Expected O, but got Unknown //IL_12a5: Unknown result type (might be due to invalid IL or missing references) //IL_12b0: Expected O, but got Unknown //IL_12b6: Expected O, but got Unknown //IL_12b1: Unknown result type (might be due to invalid IL or missing references) //IL_12b8: Expected O, but got Unknown //IL_12bd: Unknown result type (might be due to invalid IL or missing references) //IL_12c2: Unknown result type (might be due to invalid IL or missing references) //IL_12ca: Unknown result type (might be due to invalid IL or missing references) //IL_12d5: Expected O, but got Unknown //IL_12d6: Unknown result type (might be due to invalid IL or missing references) //IL_12e1: Expected O, but got Unknown //IL_12e7: Expected O, but got Unknown //IL_12e2: Unknown result type (might be due to invalid IL or missing references) //IL_12e9: Expected O, but got Unknown //IL_12ee: Unknown result type (might be due to invalid IL or missing references) //IL_12f3: Unknown result type (might be due to invalid IL or missing references) //IL_12fb: Unknown result type (might be due to invalid IL or missing references) //IL_1306: Expected O, but got Unknown //IL_1307: Unknown result type (might be due to invalid IL or missing references) //IL_1312: Expected O, but got Unknown //IL_1318: Expected O, but got Unknown //IL_1313: Unknown result type (might be due to invalid IL or missing references) //IL_131a: Expected O, but got Unknown //IL_131f: Unknown result type (might be due to invalid IL or missing references) //IL_1324: Unknown result type (might be due to invalid IL or missing references) //IL_132c: Unknown result type (might be due to invalid IL or missing references) //IL_1337: Expected O, but got Unknown //IL_1338: Unknown result type (might be due to invalid IL or missing references) //IL_1343: Expected O, but got Unknown //IL_1349: Expected O, but got Unknown //IL_1344: Unknown result type (might be due to invalid IL or missing references) //IL_134b: Expected O, but got Unknown //IL_1350: Unknown result type (might be due to invalid IL or missing references) //IL_1355: Unknown result type (might be due to invalid IL or missing references) //IL_135d: Unknown result type (might be due to invalid IL or missing references) //IL_1368: Expected O, but got Unknown //IL_1369: Unknown result type (might be due to invalid IL or missing references) //IL_1374: Expected O, but got Unknown //IL_137a: Expected O, but got Unknown //IL_1375: Unknown result type (might be due to invalid IL or missing references) //IL_137c: Expected O, but got Unknown SawSpawnrate = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Spawnrate", 1f, "How often do these turrets spawn? (default 1.0)"); SawFirerate = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)"); SawDmgMult = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Dmg Multiplier", 1.8f, "Damage multiplier for saw blades. Dmg is also dependent on the velocity of a saw blade. You can make them heal with negative values too. (default 1.8)"); SawTargetRange = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Range", 25f, "How far away a saw turret can see you. They can't see through walls though. (default 25)"); SawWindupTime = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Windup Time", 1.45f, "How long a saw turret takes before it starts firing saws at you. (default 1.45)"); SawFirerate = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)"); SawAmmo = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Ammo", 4, "Shots it takes before the turret has to reload. (default 4)"); SawReloadTime = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Reload Time", 8f, "How long it takes for a saw turret to reload its sawblades (default 8)"); SawFirerate = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)"); SawLaunchSpeed = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Projectile Speed", 3000f, "How fast are the saws launched from the saw turret? Note that the faster a saw travels, the more damage it will deal. Assume you are applying a force in Newtons (N) to the object. (default 3000)"); SawVolume = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Volume", 0.6f, "How loud are all sounds from this turret? (default 0.6)"); SawRotationSpeed = ((BaseUnityPlugin)this).Config.Bind("Saw Turret", "Rotation Speed", 100f, "How quickly does the Saw Turret rotate to face its target (degrees per second)? The lower the value, the easier it is to outmaneuver. (default 100)"); FlameSpawnrate = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Spawnrate", 1f, "How often do these turrets spawn? (default 1.0)"); FlameDmgMult = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Dmg Multiplier", 2.56f, "Damage Multiplier for flame turrets. You can make them heal with negative values too. (default 2.56)"); FlameTargetRange = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Range", 7f, "How far away a flame turret can see you. They can't see through walls though. (default 7)"); FlameRisingTime = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Rising Time", 1.4f, "Time in seconds it takes for a flame turret to rise up and fire at you. (default 1.4)"); FlameRestingTime = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Resting Time", 3f, "How long does the flame turret rest before firing again? In seconds. (default 3)"); FlameSpinningTime = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Spinning Time", 3f, "How long does the flame turret spin for (attack duration)? In seconds. (default 3)"); FlameRotationSpeed = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Rotation Speed", 120f, "How fast does a flame turret rotate when attacking (degrees per second)? (default 120)"); SmokeCooldown = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Warning Interval", 20f, "How often a flame turret releases smoke to warn the player of its presence. The smoke release phase lasts for 4.5 seconds. (default 20)"); FlameVolume = ((BaseUnityPlugin)this).Config.Bind("Flame Turret", "Volume", 0.6f, "How loud are all sounds from this turret? (default 0.6)"); LRADSpawnrate = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Spawnrate", 0.8f, "How often do these turrets spawn? (default 0.8)"); LRADTargetRange = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Range", 50f, "How far away the LRAD (sound turret) can see you. They can't see through walls though. (default 50)"); LRADDmgMult = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Dmg Multiplier", 1f, "Damage Multiplier for sound turrets. You can make them heal with negative values too. (default 1)"); LRADProjectileSpeed = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Projectile Speed Multiplier", 1.5f, "Multiplier for the Speed of the launched sound wave. (default 1.5)"); LRADReloadTime = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Time Between Shots", 60f, "Length of time before the sound cannon can fire again. (default 30)"); LRADChargeTime = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Charge Up Time", 5.53f, "Time it takes for the LRAD to charge and fire a sound wave in seconds. (default 5.53)"); LRADDisorientPeriod = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Disorientation Period", 20f, "How long deafness, visual fx, drunkness, and dizziness takes to fade away in seconds (default 20)."); LRADDizzyMult = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Dizzyness multiplier", 1f, "How much the LRAD cannon messes around with your movement, causing you to sway unpredictably. (default 1)"); LRADDrunknessMult = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Drunkness Multiplier", 2f, "How strong the drunkness effect from the LRAD cannon is. (default 2)"); LRADFXMult = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "FX Intensity", 0.8f, "Opacity multiplier to the noise and glitch visual FX when hit by the cannon. Higher values are equivalent to total blindness (default 0.8)"); LRADVolume = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Turret Volume", 1f, "How loud are all sounds from this turret? (default 1)"); LRADFXVolume = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "FX Volume", 1f, "How loud are all sounds from the Disorientation/Impact effect? (default 1)"); LRADRotationSpeed = ((BaseUnityPlugin)this).Config.Bind("Sound Turret", "Rotation Speed", 60f, "How quickly does the LRAD rotate to face its target (degrees per second)? The lower the value, the easier it is to outmaneuver. (default 60)"); MouseTrapSpawnrate = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Spawnrate", 0.8f, "How often do mouse traps spawn? Note that this is for 3 separate groups of mousetraps, not just one. (default 0.8)"); BigMTrapChance = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Big Mouse Trap Chance", 12f, "Percent chance for a mouse trap to spawn as a large one. (default 12%)"); GiantMTrapChance = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Giant Mouse Trap Chance", 8f, "Percent chance for a mouse trap to be giant. Giant traps have scrap as bait. You have to be really careful when stealing the bait! (default 8%)"); SmallMTrapDmg = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Small Mouse Trap Damage", 12, "Damage Amount for small traps. You can make them heal with negative values too. (default 12)"); BigMTrapDmg = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Big Mouse Trap Damage", 36, "Damage Amount for Medium traps. You can make them heal with negative values too. (default 36)"); GiantMTrapDmg = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Giant Mouse Trap Damage", 100, "Damage Amount for Large traps. You can make them heal with negative values too. (default 100)"); SmallMTrapAttaches = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Small Mouse Trap Attachment", true, "If Small Mouse Traps stick onto players. A weapon is required to remove the trap (default true)."); AttachmentWepRequired = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Weapon required to remove trap", true, "If mouse traps stuck onto players need a weapon to remove them. (default true)"); MTrapCanBeDisabled = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Traps can be disabled", true, "If all mouse traps can be disabled permanently by hitting them with a melee weapon. (default true)"); MTrapWhitelist = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Bait whitelist", "gift box, jar of pickles, gold bar, fancy lamp, golden cup, zed dog", "All scrap in this whitelist can be selected as bait for the giant trap. Enter the name that appears when you scan the scrap in-game. Comma separated list. (not case sensitive)."); MTrapScrapBaitForgiveness = ((BaseUnityPlugin)this).Config.Bind("Mouse Trap", "Mouse Trap Bait Forgiveness", 0.65f, "Alters the size of the hitbox that makes the giant mouse trap bait grabbable by players. The lower the value, the harder it is to get the item. 0.63 = insane, 0.65 = hard, 0.8 = forgiving, 1 = very forgiving (default 0.65)"); PlasmaSpawnrate = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Spawnrate", 1f, "How often do these turrets spawn? (default 1.0)"); PlasmaDamage = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Dmg Multiplier", 1, "Damage Multiplier for plasma projectiles. You can make them heal with negative values too. A multiplier of 1 deals 20 damage on contact. (default 1)"); PlasmaWindupTime = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Windup Time", 1.2f, "How long a plasma turret takes before it starts firing projectiles at you (in seconds). (default 1.4)"); PlasmaReloadTime = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Reload Time", 12f, "How long it takes for a plasma turret to reload (in seconds). (default 12)"); PlasmaTargetRange = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Range", 25f, "How far away a plasma turret can see you. They can't see through walls though. (default 25)"); PlasmaBallsPerBurst = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Burst Quantity", 3, "How many plasma balls are fired per burst? (default 3)"); PlasmaBurstQuantity = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Bursts per reload", 2, "How many bursts are fired before reloading? (default 2)"); PlasmaProjDelay = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Delay per projectile", 0.3f, "What is the delay between each plasma ball in a burst (in seconds)? (default 0.3)"); PlasmaBurstDelay = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Delay per Burst", 1.3f, "What is the delay between each burst of plasma (in seconds)? (default 1.3)"); PlasmaProjectileSpeed = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Projectile Launch Speed", 18f, "How fast are the plasma balls launched from this turret? Assume you are setting a speed in meters per second. (default 18)"); PlasmaTurretVolume = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Turret Volume", 0.65f, "How loud are all sounds from this turret and its projectiles? (default 0.65)"); PlasmaBallLifetime = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Plasma Ball Lifetime", 5f, "Lifetime of a plasma ball (in seconds). Plasma balls are very bouncy, so higher values will give them more bounces and cause more chaos. (default 5)"); PlasmaRotationSpeed = ((BaseUnityPlugin)this).Config.Bind("Plasma Turret", "Rotation Speed", 67f, "How quickly does the Plasma Turret rotate to face its target (degrees per second)? The lower the value, the easier it is to outmaneuver. (default 67)"); ConfigEntry flameSpawnrate = FlameSpawnrate; FloatInputFieldOptions val = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val).Min = 0f; ((BaseRangeOptions)val).Max = 100000000f; FloatInputFieldConfigItem val2 = new FloatInputFieldConfigItem(flameSpawnrate, val); ConfigEntry flameDmgMult = FlameDmgMult; FloatSliderOptions val3 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val3).Min = -5f; ((BaseRangeOptions)val3).Max = 5f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(flameDmgMult, val3); ConfigEntry flameTargetRange = FlameTargetRange; FloatSliderOptions val5 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 100f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(flameTargetRange, val5); ConfigEntry flameRisingTime = FlameRisingTime; FloatSliderOptions val7 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 10f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(flameRisingTime, val7); ConfigEntry flameRestingTime = FlameRestingTime; FloatSliderOptions val9 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val9).Min = 0f; ((BaseRangeOptions)val9).Max = 20f; FloatSliderConfigItem val10 = new FloatSliderConfigItem(flameRestingTime, val9); ConfigEntry flameSpinningTime = FlameSpinningTime; FloatSliderOptions val11 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val11).Min = 0f; ((BaseRangeOptions)val11).Max = 20f; FloatSliderConfigItem val12 = new FloatSliderConfigItem(flameSpinningTime, val11); ConfigEntry flameRotationSpeed = FlameRotationSpeed; FloatSliderOptions val13 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val13).Min = 0f; ((BaseRangeOptions)val13).Max = 1080f; FloatSliderConfigItem val14 = new FloatSliderConfigItem(flameRotationSpeed, val13); ConfigEntry flameVolume = FlameVolume; FloatSliderOptions val15 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val15).Min = 0f; ((BaseRangeOptions)val15).Max = 2f; FloatSliderConfigItem val16 = new FloatSliderConfigItem(flameVolume, val15); ConfigEntry smokeCooldown = SmokeCooldown; FloatInputFieldOptions val17 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val17).Min = 6f; ((BaseRangeOptions)val17).Max = 1E+11f; FloatInputFieldConfigItem val18 = new FloatInputFieldConfigItem(smokeCooldown, val17); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16); ConfigEntry sawSpawnrate = SawSpawnrate; FloatInputFieldOptions val19 = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val19).Min = 0f; ((BaseRangeOptions)val19).Max = 100000000f; FloatInputFieldConfigItem val20 = new FloatInputFieldConfigItem(sawSpawnrate, val19); ConfigEntry sawDmgMult = SawDmgMult; FloatSliderOptions val21 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val21).Min = -5f; ((BaseRangeOptions)val21).Max = 5f; FloatSliderConfigItem val22 = new FloatSliderConfigItem(sawDmgMult, val21); ConfigEntry sawTargetRange = SawTargetRange; FloatSliderOptions val23 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val23).Min = 0f; ((BaseRangeOptions)val23).Max = 100f; FloatSliderConfigItem val24 = new FloatSliderConfigItem(sawTargetRange, val23); ConfigEntry sawWindupTime = SawWindupTime; FloatSliderOptions val25 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val25).Min = 0f; ((BaseRangeOptions)val25).Max = 10f; FloatSliderConfigItem val26 = new FloatSliderConfigItem(sawWindupTime, val25); ConfigEntry sawFirerate = SawFirerate; FloatInputFieldOptions val27 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val27).Min = 0f; ((BaseRangeOptions)val27).Max = 100000000f; FloatInputFieldConfigItem val28 = new FloatInputFieldConfigItem(sawFirerate, val27); ConfigEntry sawVolume = SawVolume; FloatSliderOptions val29 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val29).Min = 0f; ((BaseRangeOptions)val29).Max = 2f; FloatSliderConfigItem val30 = new FloatSliderConfigItem(sawVolume, val29); ConfigEntry sawAmmo = SawAmmo; IntInputFieldOptions val31 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val31).Min = 1; ((BaseRangeOptions)val31).Max = 100000000; IntInputFieldConfigItem val32 = new IntInputFieldConfigItem(sawAmmo, val31); ConfigEntry sawReloadTime = SawReloadTime; FloatInputFieldOptions val33 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val33).Min = 0f; ((BaseRangeOptions)val33).Max = 100000000f; FloatInputFieldConfigItem val34 = new FloatInputFieldConfigItem(sawReloadTime, val33); ConfigEntry sawLaunchSpeed = SawLaunchSpeed; FloatInputFieldOptions val35 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val35).Min = 0f; ((BaseRangeOptions)val35).Max = 100000000f; FloatInputFieldConfigItem val36 = new FloatInputFieldConfigItem(sawLaunchSpeed, val35); ConfigEntry sawRotationSpeed = SawRotationSpeed; FloatInputFieldOptions val37 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val37).Min = 3600f; FloatInputFieldConfigItem val38 = new FloatInputFieldConfigItem(sawRotationSpeed, val37); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val20); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val26); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val28); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val32); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val34); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val36); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val38); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val30); ConfigEntry lRADSpawnrate = LRADSpawnrate; FloatInputFieldOptions val39 = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val39).Min = 0f; ((BaseRangeOptions)val39).Max = 100000000f; FloatInputFieldConfigItem val40 = new FloatInputFieldConfigItem(lRADSpawnrate, val39); ConfigEntry lRADTargetRange = LRADTargetRange; FloatInputFieldOptions val41 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val41).Min = 0f; ((BaseRangeOptions)val41).Max = 100000000f; FloatInputFieldConfigItem val42 = new FloatInputFieldConfigItem(lRADTargetRange, val41); ConfigEntry lRADDmgMult = LRADDmgMult; FloatSliderOptions val43 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val43).Min = -5f; ((BaseRangeOptions)val43).Max = 5f; FloatSliderConfigItem val44 = new FloatSliderConfigItem(lRADDmgMult, val43); ConfigEntry lRADProjectileSpeed = LRADProjectileSpeed; FloatInputFieldOptions val45 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val45).Min = 0f; ((BaseRangeOptions)val45).Max = 9999999f; FloatInputFieldConfigItem val46 = new FloatInputFieldConfigItem(lRADProjectileSpeed, val45); ConfigEntry lRADChargeTime = LRADChargeTime; FloatInputFieldOptions val47 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val47).Min = 0f; ((BaseRangeOptions)val47).Max = 7.2f; FloatInputFieldConfigItem val48 = new FloatInputFieldConfigItem(lRADChargeTime, val47); ConfigEntry lRADReloadTime = LRADReloadTime; FloatInputFieldOptions val49 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val49).Min = 0f; ((BaseRangeOptions)val49).Max = 999999f; FloatInputFieldConfigItem val50 = new FloatInputFieldConfigItem(lRADReloadTime, val49); ConfigEntry lRADDisorientPeriod = LRADDisorientPeriod; FloatInputFieldOptions val51 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val51).Min = 0.5f; ((BaseRangeOptions)val51).Max = 1000000f; FloatInputFieldConfigItem val52 = new FloatInputFieldConfigItem(lRADDisorientPeriod, val51); ConfigEntry lRADDizzyMult = LRADDizzyMult; FloatInputFieldOptions val53 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val53).Min = 0f; ((BaseRangeOptions)val53).Max = 1000f; FloatInputFieldConfigItem val54 = new FloatInputFieldConfigItem(lRADDizzyMult, val53); ConfigEntry lRADDrunknessMult = LRADDrunknessMult; FloatSliderOptions val55 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val55).Min = 0f; ((BaseRangeOptions)val55).Max = 5f; FloatSliderConfigItem val56 = new FloatSliderConfigItem(lRADDrunknessMult, val55); ConfigEntry lRADFXMult = LRADFXMult; FloatSliderOptions val57 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val57).Min = 0f; ((BaseRangeOptions)val57).Max = 10f; FloatSliderConfigItem val58 = new FloatSliderConfigItem(lRADFXMult, val57); ConfigEntry lRADVolume = LRADVolume; FloatSliderOptions val59 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val59).Min = 0f; ((BaseRangeOptions)val59).Max = 2f; FloatSliderConfigItem val60 = new FloatSliderConfigItem(lRADVolume, val59); ConfigEntry lRADFXVolume = LRADFXVolume; FloatSliderOptions val61 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val61).Min = 0f; ((BaseRangeOptions)val61).Max = 2f; FloatSliderConfigItem val62 = new FloatSliderConfigItem(lRADFXVolume, val61); ConfigEntry lRADRotationSpeed = LRADRotationSpeed; FloatInputFieldOptions val63 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val63).Min = 0f; ((BaseRangeOptions)val63).Max = 3600f; FloatInputFieldConfigItem val64 = new FloatInputFieldConfigItem(lRADRotationSpeed, val63); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val40); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val42); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val44); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val48); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val50); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val46); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val52); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val54); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val56); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val58); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val64); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val60); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val62); ConfigEntry mouseTrapSpawnrate = MouseTrapSpawnrate; FloatInputFieldOptions val65 = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val65).Min = 0f; ((BaseRangeOptions)val65).Max = 100000000f; FloatInputFieldConfigItem val66 = new FloatInputFieldConfigItem(mouseTrapSpawnrate, val65); ConfigEntry bigMTrapChance = BigMTrapChance; FloatInputFieldOptions val67 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val67).Min = 0f; ((BaseRangeOptions)val67).Max = 100f; FloatInputFieldConfigItem val68 = new FloatInputFieldConfigItem(bigMTrapChance, val67); ConfigEntry giantMTrapChance = GiantMTrapChance; FloatInputFieldOptions val69 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val69).Min = 0f; ((BaseRangeOptions)val69).Max = 100f; FloatInputFieldConfigItem val70 = new FloatInputFieldConfigItem(giantMTrapChance, val69); ConfigEntry smallMTrapDmg = SmallMTrapDmg; IntInputFieldOptions val71 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val71).Min = -1000; ((BaseRangeOptions)val71).Max = 1000; IntInputFieldConfigItem val72 = new IntInputFieldConfigItem(smallMTrapDmg, val71); ConfigEntry bigMTrapDmg = BigMTrapDmg; IntInputFieldOptions val73 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val73).Min = -1000; ((BaseRangeOptions)val73).Max = 1000; IntInputFieldConfigItem val74 = new IntInputFieldConfigItem(bigMTrapDmg, val73); ConfigEntry giantMTrapDmg = GiantMTrapDmg; IntInputFieldOptions val75 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val75).Min = -1000; ((BaseRangeOptions)val75).Max = 1000; IntInputFieldConfigItem val76 = new IntInputFieldConfigItem(giantMTrapDmg, val75); BoolCheckBoxConfigItem val77 = new BoolCheckBoxConfigItem(SmallMTrapAttaches, new BoolCheckBoxOptions { RequiresRestart = false }); BoolCheckBoxConfigItem val78 = new BoolCheckBoxConfigItem(AttachmentWepRequired, new BoolCheckBoxOptions { RequiresRestart = false }); BoolCheckBoxConfigItem val79 = new BoolCheckBoxConfigItem(MTrapCanBeDisabled, new BoolCheckBoxOptions { RequiresRestart = false }); TextInputFieldConfigItem val80 = new TextInputFieldConfigItem(MTrapWhitelist, new TextInputFieldOptions { RequiresRestart = false }); FloatInputFieldConfigItem val81 = new FloatInputFieldConfigItem(MTrapScrapBaitForgiveness, new FloatInputFieldOptions { RequiresRestart = false }); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val66); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val68); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val70); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val72); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val74); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val76); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val77); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val78); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val79); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val80); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val81); ConfigEntry plasmaSpawnrate = PlasmaSpawnrate; FloatInputFieldOptions val82 = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val82).Min = 0f; ((BaseRangeOptions)val82).Max = 100000000f; FloatInputFieldConfigItem val83 = new FloatInputFieldConfigItem(plasmaSpawnrate, val82); ConfigEntry plasmaDamage = PlasmaDamage; IntInputFieldOptions val84 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val84).Min = -1000; ((BaseRangeOptions)val84).Max = 1000; IntInputFieldConfigItem val85 = new IntInputFieldConfigItem(plasmaDamage, val84); ConfigEntry plasmaWindupTime = PlasmaWindupTime; FloatInputFieldOptions val86 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val86).Min = 0f; ((BaseRangeOptions)val86).Max = 1000f; FloatInputFieldConfigItem val87 = new FloatInputFieldConfigItem(plasmaWindupTime, val86); ConfigEntry plasmaReloadTime = PlasmaReloadTime; FloatInputFieldOptions val88 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val88).Min = 0f; ((BaseRangeOptions)val88).Max = 1000f; FloatInputFieldConfigItem val89 = new FloatInputFieldConfigItem(plasmaReloadTime, val88); ConfigEntry plasmaTargetRange = PlasmaTargetRange; FloatInputFieldOptions val90 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val90).Min = 0f; ((BaseRangeOptions)val90).Max = 1000f; FloatInputFieldConfigItem val91 = new FloatInputFieldConfigItem(plasmaTargetRange, val90); ConfigEntry plasmaTurretVolume = PlasmaTurretVolume; FloatInputFieldOptions val92 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val92).Min = 0f; ((BaseRangeOptions)val92).Max = 1f; FloatInputFieldConfigItem val93 = new FloatInputFieldConfigItem(plasmaTurretVolume, val92); ConfigEntry plasmaProjectileSpeed = PlasmaProjectileSpeed; FloatInputFieldOptions val94 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val94).Min = 0f; ((BaseRangeOptions)val94).Max = 100000000f; FloatInputFieldConfigItem val95 = new FloatInputFieldConfigItem(plasmaProjectileSpeed, val94); ConfigEntry plasmaBallsPerBurst = PlasmaBallsPerBurst; IntInputFieldOptions val96 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val96).Min = 1; ((BaseRangeOptions)val96).Max = 100000000; IntInputFieldConfigItem val97 = new IntInputFieldConfigItem(plasmaBallsPerBurst, val96); ConfigEntry plasmaBurstQuantity = PlasmaBurstQuantity; IntInputFieldOptions val98 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val98).Min = 1; ((BaseRangeOptions)val98).Max = 100000000; IntInputFieldConfigItem val99 = new IntInputFieldConfigItem(plasmaBurstQuantity, val98); ConfigEntry plasmaBurstDelay = PlasmaBurstDelay; FloatInputFieldOptions val100 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val100).Min = 0f; ((BaseRangeOptions)val100).Max = 100000000f; FloatInputFieldConfigItem val101 = new FloatInputFieldConfigItem(plasmaBurstDelay, val100); ConfigEntry plasmaProjDelay = PlasmaProjDelay; FloatInputFieldOptions val102 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val102).Min = 0f; ((BaseRangeOptions)val102).Max = 100000000f; FloatInputFieldConfigItem val103 = new FloatInputFieldConfigItem(plasmaProjDelay, val102); ConfigEntry plasmaBallLifetime = PlasmaBallLifetime; FloatInputFieldOptions val104 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val104).Min = 0f; ((BaseRangeOptions)val104).Max = 100000000f; FloatInputFieldConfigItem val105 = new FloatInputFieldConfigItem(plasmaBallLifetime, val104); ConfigEntry plasmaRotationSpeed = PlasmaRotationSpeed; FloatInputFieldOptions val106 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val106).Min = 0f; ((BaseRangeOptions)val106).Max = 10000f; FloatInputFieldConfigItem val107 = new FloatInputFieldConfigItem(plasmaRotationSpeed, val106); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val83); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val85); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val91); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val87); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val89); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val95); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val97); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val99); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val101); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val103); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val107); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val105); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val93); } public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); TrapBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "bcs_devioustraps")); Debug.Log((object)("DeviousTraps Bundle::: " + (object)TrapBundle)); } } } namespace DeviousTraps.src { public class FlameHitbox : NetworkBehaviour { internal Vector3 LaunchForce = Vector3.zero; public Collider Collider; private float HitCooldown = 0f; private float HitCooldownReset = 0.2f; private float LastHitEnemyCooldown = 0f; public static float BaseDmg = 10f; public float dmgRamp = 0f; public static float dmgRampTime = 0.45f; public void Update() { HitCooldown -= Time.deltaTime; LastHitEnemyCooldown -= Time.deltaTime; if (dmgRamp < 1f) { dmgRamp += Time.deltaTime / dmgRampTime; if (dmgRamp > 1f) { dmgRamp = 1f; } } } public void ResetDmgRamp() { dmgRamp = 0f; } [ClientRpc] public void DmgPlayerClientRpc(ulong netid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2246517757u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2246517757u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } [ClientRpc] public void KillPlayerClientRpc(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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1308895154u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1308895154u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.KillPlayer(val3.playerRigidbody.velocity, true, (CauseOfDeath)13, 0, default(Vector3), false); } } } public void OnTriggerStay(Collider other) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost || dmgRamp <= 0f) { return; } GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); EnemyAI component2 = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && HitCooldown <= 0f) { int num = (int)(dmgRamp * BaseDmg * Plugin.FlameDmgMult.Value); if (num >= component.health) { KillPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId); } else { DmgPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId, num); } HitCooldown = HitCooldownReset; } if (Object.op_Implicit((Object)(object)component2) && LastHitEnemyCooldown <= 0f) { component2.HitEnemyClientRpc(3, -1, true, -1); LastHitEnemyCooldown = HitCooldownReset; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2246517757u, new RpcReceiveHandler(__rpc_handler_2246517757), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1308895154u, new RpcReceiveHandler(__rpc_handler_1308895154), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2246517757(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameHitbox)(object)target).DmgPlayerClientRpc(netid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1308895154(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameHitbox)(object)target).KillPlayerClientRpc(netid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FlameHitbox"; } } public class FlameTurret : NetworkBehaviour { public AudioSource AudioFlameTurretOn; public AudioSource AudioFireFlames; public AudioSource AudioReload; public AudioSource AudioSmokeRelease; public AudioSource AudioPowerDown; private bool Activated = false; public ParticleSystem Fire1; public ParticleSystem Fire2; public ParticleSystem Fire3; public Light Light1; public Light Light2; public Light Light3; public FlameHitbox H1; public FlameHitbox H2; public FlameHitbox H3; public GameObject pillar; public GameObject SmokeSystem; internal Animator animator; private bool On = false; private bool lastOn = false; [Tooltip("How high the pillar moves up from its starting local Y (world units).")] public float ElevationAmount = 2.2f; private float t_SmokeReleaseTotal = 0f; private float t_SpinningTimeTotal = 0f; private float t_StandbyTimeTotal = 0f; private float t_ElevationState = 0f; private bool InStandby = false; private float pillarBaseY; public float TimeUntilEnabled = -1f; public bool Inactive = false; public void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) Activated = false; animator = ((Component)this).GetComponent(); pillarBaseY = pillar.transform.localPosition.y; AudioFlameTurretOn.volume = Plugin.FlameVolume.Value; AudioFireFlames.volume = Plugin.FlameVolume.Value; AudioReload.volume = Plugin.FlameVolume.Value; AudioSmokeRelease.volume = Plugin.FlameVolume.Value / 9f; AudioPowerDown.volume = Plugin.FlameVolume.Value; } public void Update() { if (((NetworkBehaviour)this).IsServer) { OnOffConditional(); if (On != lastOn) { SetOnStateClientRpc(On); ToggleTurretOnClientRpc(On); lastOn = On; } } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { t_SmokeReleaseTotal -= Time.deltaTime; if (t_SmokeReleaseTotal < 0f) { t_SmokeReleaseTotal = Plugin.SmokeCooldown.Value; PlaySmokeReleaseClientRpc(); } } TimeUntilEnabled -= Time.deltaTime; if (Inactive && TimeUntilEnabled < 0f) { TerminalToggleClientRpc(turnOn: true); } AITick(); } [ClientRpc] public void TerminalToggleClientRpc(bool turnOn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4023908665u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turnOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4023908665u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (turnOn) { TimeUntilEnabled = -1f; Inactive = false; } else { TimeUntilEnabled = 7f; Inactive = true; AudioPowerDown.Play(); } } } public void OnOffConditional() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) float num = Plugin.FlameTargetRange.Value; PlayerControllerB val = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val2 in array) { if (!((Object)(object)val2 == (Object)null) && !val2.isPlayerDead) { Vector3 val3 = ((Component)this).transform.position + Vector3.up * 1.2f; Vector3 position = ((Component)val2.gameplayCamera).transform.position; float num2 = Vector3.Distance(val3, position); if (!(num2 > Plugin.FlameTargetRange.Value) && !Physics.Linecast(val3, position, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1) && num2 < num) { num = num2; val = val2; } } } On = (Object)(object)val != (Object)null && !Inactive; } private void SetPillarHeight(float normalized) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) normalized = Mathf.Clamp01(normalized); t_ElevationState = normalized; float num = ((Component)this).transform.lossyScale.y; if (num <= 0f) { num = 1f; } float num2 = ElevationAmount / num; Vector3 localPosition = pillar.transform.localPosition; localPosition.y = pillarBaseY + num2 * normalized; pillar.transform.localPosition = localPosition; } public void TerminalDisableTurretMethod() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { TerminalToggleClientRpc(turnOn: false); } else { TerminalToggleServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void TerminalToggleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1935411860u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1935411860u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalToggleClientRpc(turnOn: false); } } } public void AITick() { if (Inactive) { if (Activated && ((NetworkBehaviour)this).IsServer) { SetGroupActiveClientRpc(value: false); } if (AudioFlameTurretOn.isPlaying) { StopFireClientRpc(); } return; } if (!InStandby) { if (t_ElevationState < 1f) { if (!AudioFlameTurretOn.isPlaying) { PlayFireClientRpc(); } float num = Time.deltaTime / Plugin.FlameRisingTime.Value; SetPillarHeight(t_ElevationState + num); } else if (t_SpinningTimeTotal < Plugin.FlameSpinningTime.Value) { if (((NetworkBehaviour)this).IsServer && !Activated) { SetGroupActiveClientRpc(value: true); } t_SpinningTimeTotal += Time.deltaTime; pillar.transform.Rotate(0f, Plugin.FlameRotationSpeed.Value * Time.deltaTime, 0f, (Space)1); } else { InStandby = true; } return; } if (((NetworkBehaviour)this).IsServer && Activated) { if (AudioFlameTurretOn.isPlaying) { StopFireClientRpc(); } SetGroupActiveClientRpc(value: false); } if (t_ElevationState > 0f) { if (!AudioReload.isPlaying) { PlayReloadClientRpc(); } float num2 = Time.deltaTime / Plugin.FlameRisingTime.Value; SetPillarHeight(t_ElevationState - num2); } else if (t_StandbyTimeTotal < Plugin.FlameRestingTime.Value) { t_StandbyTimeTotal += Time.deltaTime; } else if (On) { InStandby = false; t_StandbyTimeTotal = 0f; t_SpinningTimeTotal = 0f; } } [ClientRpc] public void PlaySmokeReleaseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(941713206u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 941713206u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(PlaySmokeCoroutine()); } } } public IEnumerator PlaySmokeCoroutine() { SmokeSystem.SetActive(true); yield return (object)new WaitForSeconds(4.5f); SmokeSystem.SetActive(false); } [ClientRpc] private void SetOnStateClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1393123788u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1393123788u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; On = value; } } } [ClientRpc] public void SetGroupActiveClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2323146907u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2323146907u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Activated = value; if (value) { AudioFireFlames.Play(); Fire1.Play(); Fire2.Play(); Fire3.Play(); ((Behaviour)Light1).enabled = true; ((Behaviour)Light2).enabled = true; ((Behaviour)Light3).enabled = true; ((Behaviour)H1).enabled = true; ((Behaviour)H2).enabled = true; ((Behaviour)H3).enabled = true; } else { AudioFireFlames.Stop(); Fire1.Stop(); Fire2.Stop(); Fire3.Stop(); ((Behaviour)Light1).enabled = false; ((Behaviour)Light2).enabled = false; ((Behaviour)Light3).enabled = false; ((Behaviour)H1).enabled = false; ((Behaviour)H2).enabled = false; ((Behaviour)H3).enabled = false; H1.ResetDmgRamp(); H2.ResetDmgRamp(); H3.ResetDmgRamp(); } } } [ClientRpc] public void PlayFireClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(141116094u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 141116094u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioFlameTurretOn.Play(); } } } [ClientRpc] public void StopFireClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2040491108u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2040491108u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioFlameTurretOn.Stop(); } } } [ClientRpc] public void PlayReloadClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2148362063u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2148362063u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioReload.Play(); } } } [ClientRpc] public void StopReloadClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1334700428u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1334700428u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioReload.Stop(); } } } [ClientRpc] public void ToggleTurretOnClientRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1074175290u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1074175290u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (on && AudioReload.isPlaying) { AudioReload.Stop(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4023908665u, new RpcReceiveHandler(__rpc_handler_4023908665), "TerminalToggleClientRpc"); ((NetworkBehaviour)this).__registerRpc(1935411860u, new RpcReceiveHandler(__rpc_handler_1935411860), "TerminalToggleServerRpc"); ((NetworkBehaviour)this).__registerRpc(941713206u, new RpcReceiveHandler(__rpc_handler_941713206), "PlaySmokeReleaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(1393123788u, new RpcReceiveHandler(__rpc_handler_1393123788), "SetOnStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(2323146907u, new RpcReceiveHandler(__rpc_handler_2323146907), "SetGroupActiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(141116094u, new RpcReceiveHandler(__rpc_handler_141116094), "PlayFireClientRpc"); ((NetworkBehaviour)this).__registerRpc(2040491108u, new RpcReceiveHandler(__rpc_handler_2040491108), "StopFireClientRpc"); ((NetworkBehaviour)this).__registerRpc(2148362063u, new RpcReceiveHandler(__rpc_handler_2148362063), "PlayReloadClientRpc"); ((NetworkBehaviour)this).__registerRpc(1334700428u, new RpcReceiveHandler(__rpc_handler_1334700428), "StopReloadClientRpc"); ((NetworkBehaviour)this).__registerRpc(1074175290u, new RpcReceiveHandler(__rpc_handler_1074175290), "ToggleTurretOnClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4023908665(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool turnOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turnOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).TerminalToggleClientRpc(turnOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1935411860(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).TerminalToggleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_941713206(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).PlaySmokeReleaseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1393123788(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool onStateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref onStateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).SetOnStateClientRpc(onStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2323146907(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool groupActiveClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref groupActiveClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).SetGroupActiveClientRpc(groupActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_141116094(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).PlayFireClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2040491108(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).StopFireClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2148362063(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).PlayReloadClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1334700428(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).StopReloadClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1074175290(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool on = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref on, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlameTurret)(object)target).ToggleTurretOnClientRpc(on); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FlameTurret"; } } internal class FlameTurretSpawnCurves { public static readonly AnimationCurve WeakCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value), new Keyframe(0.4f, 1f * Plugin.FlameSpawnrate.Value), new Keyframe(0.7f, 3f * Plugin.FlameSpawnrate.Value), new Keyframe(0.9f, 5f * Plugin.FlameSpawnrate.Value), new Keyframe(0.97f, 6f * Plugin.FlameSpawnrate.Value), new Keyframe(1f, 8f * Plugin.FlameSpawnrate.Value) }); public static readonly AnimationCurve NormalCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value), new Keyframe(0.4f, 2f * Plugin.FlameSpawnrate.Value), new Keyframe(0.7f, 5f * Plugin.FlameSpawnrate.Value), new Keyframe(0.9f, 8f * Plugin.FlameSpawnrate.Value), new Keyframe(0.97f, 10f * Plugin.FlameSpawnrate.Value), new Keyframe(1f, 15f * Plugin.FlameSpawnrate.Value) }); public static readonly AnimationCurve AggressiveCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value), new Keyframe(0.4f, 5f * Plugin.FlameSpawnrate.Value), new Keyframe(0.7f, 7f * Plugin.FlameSpawnrate.Value), new Keyframe(0.9f, 8f * Plugin.FlameSpawnrate.Value), new Keyframe(0.97f, 15f * Plugin.FlameSpawnrate.Value), new Keyframe(1f, 35f * Plugin.FlameSpawnrate.Value) }); } public class PlasmaBall : NetworkBehaviour { public Gradient ballColor; public Gradient trailColor; public float speed; [Range(0f, 10f)] public float moveDelay; public GameObject explosionEffect; private List ballPS; private List trailPS; private float creationTime = -1f; private float explosionTime = -1f; public AudioSource laserHit; private List explosions; public int owner; private void Start() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) GetRequiredComponents(); ((MonoBehaviour)this).Invoke("MovementStatus", moveDelay); laserHit.volume = Plugin.PlasmaTurretVolume.Value / 2f; creationTime = Time.time; explosions = new List(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).GetComponent().velocity = ((Component)this).transform.forward * speed; } } public void SetScale(float mult) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.localScale *= mult; } private void FixedUpdate() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && ((explosionTime != -1f && Time.time - explosionTime > 3f) || Time.time - creationTime > Plugin.PlasmaBallLifetime.Value)) { for (int i = 0; i < explosions.Count; i++) { Object.Destroy((Object)(object)explosions[i]); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void OnCollisionEnter(Collision collision) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } GameObject gameObject = collision.gameObject; if (Object.op_Implicit((Object)(object)collision.gameObject)) { spawnExplosionClientRpc(); EnemyAI val = enemyParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val) && ((Object)val).GetInstanceID() != owner) { val.HitEnemy(1, (PlayerControllerB)null, true, -1); } PlayerControllerB val2 = playerParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val2)) { dmgPlayerClientRpc(((NetworkBehaviour)val2).NetworkObjectId); } } else if (Object.op_Implicit((Object)(object)collision.collider)) { spawnExplosionClientRpc(); } } [ClientRpc] private void dmgPlayerClientRpc(ulong nid) { //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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3729521802u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, nid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3729521802u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObjectId == nid) { val3.DamagePlayer(Plugin.PlasmaDamage.Value * 20, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } [ClientRpc] private void spawnExplosionClientRpc() { //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_00ea: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3587245295u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3587245295u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; explosionTime = Time.time; GameObject val3 = Object.Instantiate(explosionEffect); val3.transform.position = ((Component)this).transform.position; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { explosions.Add(val3); } laserHit.Play(); } } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public EnemyAI enemyParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } private void GetRequiredComponents() { ParticleSystem[] componentsInChildren = ((Component)this).GetComponentsInChildren(); if (componentsInChildren == null) { Debug.LogError((object)("Missing Particle System: No Particle System was found inside" + ((object)((Component)this).gameObject).ToString())); return; } ballPS = new List(); trailPS = new List(); for (int i = 0; i < componentsInChildren.Length; i++) { if (((Object)((Component)componentsInChildren[i]).gameObject).name == "Ball") { ballPS.Add(componentsInChildren[i]); } else if (((Object)((Component)componentsInChildren[i]).gameObject).name == "Trail") { trailPS.Add(componentsInChildren[i]); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3729521802u, new RpcReceiveHandler(__rpc_handler_3729521802), "dmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3587245295u, new RpcReceiveHandler(__rpc_handler_3587245295), "spawnExplosionClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3729521802(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong nid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref nid); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaBall)(object)target).dmgPlayerClientRpc(nid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3587245295(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaBall)(object)target).spawnExplosionClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PlasmaBall"; } } internal class PlasmaTurret : NetworkBehaviour { public AudioSource AudioPlasmaTurretOnClicking; public AudioSource AudioPlasmaTurretOn; public AudioSource AudioPlasmaQuickCharge; public AudioSource AudioPlasmaOnSwitch; public AudioSource AudioFireBall; public AudioSource AudioPowerDown; public GameObject ActivationGroup; public PlayerControllerB TargetPlayer; public Transform PlasmaSpawnPoint; public Transform TurretSwivel; private bool Reloading = false; public AudioSource AudioReload; public AudioSource AudioDoneReloading; private float TimeUntilDoneReloading = 0f; private float TimeUntilBurstReady = 0f; private int CurrentAmmo = 0; private int CurrentBursts = 0; internal Animator animator; private bool On = false; private float WindUpVolumeMultiplier = 0f; public BoxCollider ShiftColliderArea; public static Vector3 shiftVector = new Vector3(0f, 1f, 0f); private bool IsCeilingMounted = false; public float TimeUntilEnabled = -1f; public bool AnimationToggle = false; public bool Inactive = false; private bool MidBurst = false; private float WindTime = 0f; private float CooldownTime = 0f; private float BurstCooldownTime = 0f; public static float ycorrect = 90f; public static float zcorrect = 90f; public static Quaternion FireRotationOffset = Quaternion.Euler(0f, 0f, 0f); public void Start() { ActivationGroup.SetActive(false); animator = ((Component)this).GetComponent(); AudioPlasmaTurretOn.volume = Plugin.PlasmaTurretVolume.Value; AudioFireBall.volume = Plugin.PlasmaTurretVolume.Value; AudioReload.volume = Plugin.PlasmaTurretVolume.Value; AudioDoneReloading.volume = Plugin.PlasmaTurretVolume.Value; AudioPowerDown.volume = Plugin.PlasmaTurretVolume.Value; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { try { PositionShiftForFiring(); } catch (Exception ex) { Debug.LogError((object)ex); } } } public override void OnNetworkSpawn() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) SyncTransformClientRpc(((Component)this).transform.position, ((Component)this).transform.rotation); } [ClientRpc] public void SyncTransformClientRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1580195517u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1580195517u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).transform.position = pos; ((Component)this).transform.rotation = rot; } } } public void PositionShiftForFiring() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_007f: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) Collider shiftColliderArea = (Collider)(object)ShiftColliderArea; if ((Object)(object)shiftColliderArea == (Object)null) { return; } Bounds bounds = shiftColliderArea.bounds; Vector3 extents = ((Bounds)(ref bounds)).extents; LayerMask val = LayerMask.op_Implicit(StartOfRound.Instance.collidersAndRoomMaskAndDefault); float num = 15f; float num2 = 2f; RaycastHit val3 = default(RaycastHit); for (float num3 = num2; num3 <= num; num3 += num2) { Vector3 val2 = ((Component)this).transform.position + ((Component)this).transform.up * num3; if (Physics.Raycast(val2, shiftVector, ref val3, num, LayerMask.op_Implicit(val))) { Vector3 val4 = ((Component)this).transform.position; string? text = ((object)(Vector3)(ref val4)).ToString(); val4 = ((RaycastHit)(ref val3)).point; Debug.Log((object)("Devious Traps: Attached plasma turret to roof. Starting Position: " + text + " End Position: " + ((object)(Vector3)(ref val4)).ToString())); ((Component)this).transform.position = ((RaycastHit)(ref val3)).point; IsCeilingMounted = true; ((Component)this).transform.rotation = Quaternion.Euler(180f, ((Component)this).transform.eulerAngles.y, ((Component)this).transform.eulerAngles.z); return; } } Debug.Log((object)"Devious Traps: Plasma Turret Roof attachment failure. This doesn't break the turret, it just means it will shoot on the floor instead."); } public void TerminalDisableTurretMethod() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { TerminalToggleClientRpc(turnOn: false); } else { TerminalToggleServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void TerminalToggleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(590816450u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 590816450u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalToggleClientRpc(turnOn: false); } } } [ClientRpc] public void TerminalToggleClientRpc(bool turnOn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(104250528u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turnOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 104250528u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (turnOn) { TimeUntilEnabled = -1f; AnimationToggle = false; Inactive = false; } else { TimeUntilEnabled = 7f; AnimationToggle = true; Inactive = true; AudioPowerDown.Play(); } } } public void Update() { //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { OnOffConditional(); } AudioPlasmaTurretOn.volume = Plugin.PlasmaTurretVolume.Value * WindUpVolumeMultiplier; if (On) { if (((NetworkBehaviour)RoundManager.Instance).IsHost && !AudioPlasmaTurretOn.isPlaying) { ToggleTurretOnClientRpc(on: true); } if (WindUpVolumeMultiplier < 1f) { WindUpVolumeMultiplier += Plugin.PlasmaWindupTime.Value * Time.deltaTime; } AITick(); } else { if (((NetworkBehaviour)RoundManager.Instance).IsHost && AudioPlasmaTurretOn.isPlaying) { ToggleTurretOnClientRpc(on: false); } if (WindUpVolumeMultiplier > 0.25f) { WindUpVolumeMultiplier -= Plugin.PlasmaWindupTime.Value * Time.deltaTime; } } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (TimeUntilDoneReloading < 0f && Reloading) { Reloading = false; PlayFinishReloadingClientRpc(); CurrentAmmo = Plugin.PlasmaBallsPerBurst.Value; CurrentBursts = Plugin.PlasmaBurstQuantity.Value - 1; } else if (!Reloading) { if (CurrentAmmo <= 0 && CurrentBursts <= 0) { Reloading = true; TimeUntilDoneReloading = Plugin.PlasmaReloadTime.Value; PlayReloadingClientRpc(); } else if (CurrentAmmo <= 0) { BurstCooldownTime = Plugin.PlasmaBurstDelay.Value; CurrentAmmo = Plugin.PlasmaBallsPerBurst.Value; CurrentBursts--; } } } AnimatorStateInfo currentAnimatorStateInfo; if (TimeUntilEnabled < 0f && AnimationToggle) { AnimationToggle = false; currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("ToEnabled")) { PlayTurnOnClientRpc(); } } if (Inactive && TimeUntilEnabled < 0f) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("ToEnabled")) { TerminalToggleClientRpc(turnOn: true); } } TimeUntilDoneReloading -= Time.deltaTime; WindTime += Time.deltaTime; CooldownTime -= Time.deltaTime; BurstCooldownTime -= Time.deltaTime; TimeUntilEnabled -= Time.deltaTime; } [ClientRpc] public void PlayTurnOnClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(217810599u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 217810599u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.Play("ToEnabled"); } } } [ClientRpc] public void PlayReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(710139870u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 710139870u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioReload.Play(); } } } [ClientRpc] public void PlayFinishReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2952302656u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2952302656u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioDoneReloading.Play(); AudioReload.Stop(); } } } public void OnOffConditional() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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) float num = Plugin.PlasmaTargetRange.Value; PlayerControllerB val = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val2 in array) { if (!((Object)(object)val2 == (Object)null) && !val2.isPlayerDead) { Vector3 val3 = ((Component)this).transform.position + (IsCeilingMounted ? (-((Component)this).transform.up) : ((Component)this).transform.up) * 1.2f; Vector3 position = ((Component)val2.gameplayCamera).transform.position; float num2 = Vector3.Distance(val3, position); if (!(num2 > Plugin.PlasmaTargetRange.Value) && !Physics.Linecast(val3, position, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1) && num2 < num) { num = num2; val = val2; } } } if ((Object)(object)val != (Object)null && CurrentAmmo > 0 && !Inactive) { if ((Object)(object)TargetPlayer != (Object)(object)val) { } SetTargetPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId); TurnOnClientRpc(value: true); } else { SetTargetPlayerClientRpc(9999999uL); TurnOnClientRpc(value: false); WindTime = 0f; CooldownTime = 0f; } } [ClientRpc] public void TurnOnClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3081813270u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3081813270u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; On = value; } } } [ClientRpc] public void SetTargetPlayerClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2695506072u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2695506072u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (netid == 9999999) { TargetPlayer = null; return; } PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (!((Object)(object)val3 == (Object)null) && !val3.isPlayerDead && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { TargetPlayer = val3; } } } public void AITick() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { facePosition(((Component)TargetPlayer).transform.position); if (BurstCooldownTime < 0f && WindTime > Plugin.PlasmaWindupTime.Value && CooldownTime < 0f) { CooldownTime = Plugin.PlasmaProjDelay.Value; Fire(); } } } public void Fire() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)TargetPlayer).transform.position - PlasmaSpawnPoint.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(TurretSwivel.forward, normalized); Vector3 val2 = ((num <= 30f) ? normalized : TurretSwivel.forward); Quaternion val3 = Quaternion.LookRotation(val2, Vector3.up); Quaternion val4 = val3 * FireRotationOffset; GameObject val5 = Object.Instantiate(Plugin.PlasmaBallPrefab, PlasmaSpawnPoint.position, val4); PlasmaBall component = val5.GetComponent(); component.speed = Plugin.PlasmaProjectileSpeed.Value; component.SetScale(((Component)this).transform.localScale.y); ((Component)component).GetComponent().Spawn(false); PlayLaunchSoundClientRpc(); CurrentAmmo--; } [ClientRpc] public void PlayLaunchSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2036830933u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2036830933u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioFireBall.Play(); } } } [ClientRpc] public void ToggleTurretOnClientRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(908585102u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 908585102u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (on) { AudioPlasmaTurretOn.Play(); AudioPlasmaOnSwitch.Play(); AudioPlasmaTurretOnClicking.Play(); ActivationGroup.SetActive(true); animator.Play("On"); } else { AudioPlasmaTurretOn.Stop(); AudioPlasmaTurretOnClicking.Stop(); ActivationGroup.SetActive(false); animator.Play("Off"); } } } public void facePosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - TurretSwivel.position; if (!(val == Vector3.zero)) { if (IsCeilingMounted) { val = ((Component)this).transform.InverseTransformDirection(val); } Quaternion val2 = Quaternion.LookRotation(val); Quaternion localRotation = TurretSwivel.localRotation; Vector3 eulerAngles = ((Quaternion)(ref localRotation)).eulerAngles; Vector3 eulerAngles2 = ((Quaternion)(ref val2)).eulerAngles; float num = Time.deltaTime * Plugin.PlasmaRotationSpeed.Value; float num2 = Mathf.MoveTowardsAngle(eulerAngles.x, eulerAngles2.x, num); float num3 = Mathf.MoveTowardsAngle(eulerAngles.y, eulerAngles2.y, num); TurretSwivel.localRotation = Quaternion.Euler(num2, num3, 0f); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1580195517u, new RpcReceiveHandler(__rpc_handler_1580195517), "SyncTransformClientRpc"); ((NetworkBehaviour)this).__registerRpc(590816450u, new RpcReceiveHandler(__rpc_handler_590816450), "TerminalToggleServerRpc"); ((NetworkBehaviour)this).__registerRpc(104250528u, new RpcReceiveHandler(__rpc_handler_104250528), "TerminalToggleClientRpc"); ((NetworkBehaviour)this).__registerRpc(217810599u, new RpcReceiveHandler(__rpc_handler_217810599), "PlayTurnOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(710139870u, new RpcReceiveHandler(__rpc_handler_710139870), "PlayReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(2952302656u, new RpcReceiveHandler(__rpc_handler_2952302656), "PlayFinishReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3081813270u, new RpcReceiveHandler(__rpc_handler_3081813270), "TurnOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(2695506072u, new RpcReceiveHandler(__rpc_handler_2695506072), "SetTargetPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2036830933u, new RpcReceiveHandler(__rpc_handler_2036830933), "PlayLaunchSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(908585102u, new RpcReceiveHandler(__rpc_handler_908585102), "ToggleTurretOnClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1580195517(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).SyncTransformClientRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_590816450(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).TerminalToggleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_104250528(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool turnOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turnOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).TerminalToggleClientRpc(turnOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_217810599(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).PlayTurnOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_710139870(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).PlayReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2952302656(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).PlayFinishReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3081813270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).TurnOnClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2695506072(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong targetPlayerClientRpc = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).SetTargetPlayerClientRpc(targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2036830933(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).PlayLaunchSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_908585102(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool on = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref on, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaTurret)(object)target).ToggleTurretOnClientRpc(on); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PlasmaTurret"; } } public class SawProjectileV2 : NetworkBehaviour { internal Vector3 LaunchForce = Vector3.zero; public Rigidbody RigidBody; public Collider Collider; private float LastHitPlayerCooldown = 0f; private PlayerControllerB LastHitPlayer; private float LastHitEnemyCooldown = 0f; private EnemyAI LastHitEnemy; private float HitCooldownReset = 0.2f; private float Lifetime = 60f; public Material BloodMat; public MeshRenderer Renderer; public AudioSource AudioBlood1; public AudioSource AudioBlood2; public AudioSource AudioBlood3; public AudioSource AudioBounce; public GameObject BloodParticles; public GameObject SparkParticles; public float BloodLifetime = 0f; public static float BounceSoundThreshold = 5f; private Vector3 PreviousVelocity = Vector3.zero; public static float sawPushMultiplier = 40f; public void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { RigidBody.AddForce(LaunchForce); } AudioBlood1.volume = Plugin.SawVolume.Value; AudioBlood2.volume = Plugin.SawVolume.Value; AudioBlood3.volume = Plugin.SawVolume.Value; AudioBounce.volume = Plugin.SawVolume.Value; } public void SetScale(float mult) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.localScale *= mult; } public void Update() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) LastHitPlayerCooldown -= Time.deltaTime; LastHitEnemyCooldown -= Time.deltaTime; Lifetime -= Time.deltaTime; BloodLifetime -= Time.deltaTime; if (BloodLifetime < 0f && BloodParticles.activeInHierarchy) { ParticleSetClientRpc(active: false); } Vector3 velocity = RigidBody.velocity; Vector3 previousVelocity = PreviousVelocity; PreviousVelocity = velocity; Vector3 val = velocity - previousVelocity; if (((Vector3)(ref val)).magnitude > BounceSoundThreshold) { PlayBounceClientRpc(); } if (Lifetime < 0f && ((NetworkBehaviour)RoundManager.Instance).IsHost) { Object.Destroy((Object)(object)((Component)this).gameObject); } } [ClientRpc] public void DmgPlayerClientRpc(ulong netid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3509185095u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3509185095u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); BloodLifetime = 0.8f; ((Renderer)Renderer).material = BloodMat; } } } [ClientRpc] public void KillPlayerClientRpc(ulong netid, Vector3 launchVelocity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3626191914u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref launchVelocity); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3626191914u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.KillPlayer(launchVelocity, true, (CauseOfDeath)17, 7, default(Vector3), false); BloodLifetime = 0.8f; ((Renderer)Renderer).material = BloodMat; } } } [ClientRpc] public void ParticleSetClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(721753425u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 721753425u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BloodParticles.SetActive(active); } } } [ClientRpc] public void PlayBounceClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1570402476u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1570402476u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioBounce.Play(); } } } [ClientRpc] public void SparkSetClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2861241470u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2861241470u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SparkParticles.SetActive(active); } } } [ClientRpc] public void PlayShredClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1722453318u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1722453318u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (id) { case 1: AudioBlood1.Play(); break; case 2: AudioBlood2.Play(); break; case 3: AudioBlood3.Play(); break; default: AudioBlood1.Play(); break; } } } public void OnTriggerEnter(Collider other) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); EnemyAI component2 = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (LastHitPlayerCooldown <= 0f || (Object)(object)component != (Object)(object)LastHitPlayer)) { Random random = new Random(); Vector3 val = component.playerRigidbody.velocity; float magnitude = ((Vector3)(ref val)).magnitude; val = RigidBody.velocity; int num = (int)(Math.Max(magnitude, ((Vector3)(ref val)).magnitude) * Plugin.SawDmgMult.Value); if (num > 10) { PlayShredClientRpc(random.Next(3) + 1); ParticleSetClientRpc(active: true); } if (num >= component.health) { KillPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId, RigidBody.velocity); } else if (num >= 5) { DmgPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId, num); val = ((Component)this).transform.position - ((Component)component).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; RigidBody.AddForce(normalized * sawPushMultiplier, (ForceMode)1); LastHitPlayerCooldown = HitCooldownReset; LastHitPlayer = component; } else { val = ((Component)this).transform.position - ((Component)component).transform.position; Vector3 normalized2 = ((Vector3)(ref val)).normalized; RigidBody.AddForce(normalized2 * sawPushMultiplier, (ForceMode)1); LastHitPlayerCooldown = HitCooldownReset; LastHitPlayer = component; } LastHitPlayerCooldown = HitCooldownReset; LastHitPlayer = component; } if (Object.op_Implicit((Object)(object)component2) && (LastHitEnemyCooldown <= 0f || (Object)(object)component2 != (Object)(object)LastHitEnemy)) { component2.HitEnemyClientRpc(3, -1, true, -1); LastHitEnemyCooldown = HitCooldownReset; LastHitEnemy = component2; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3509185095u, new RpcReceiveHandler(__rpc_handler_3509185095), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3626191914u, new RpcReceiveHandler(__rpc_handler_3626191914), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(721753425u, new RpcReceiveHandler(__rpc_handler_721753425), "ParticleSetClientRpc"); ((NetworkBehaviour)this).__registerRpc(1570402476u, new RpcReceiveHandler(__rpc_handler_1570402476), "PlayBounceClientRpc"); ((NetworkBehaviour)this).__registerRpc(2861241470u, new RpcReceiveHandler(__rpc_handler_2861241470), "SparkSetClientRpc"); ((NetworkBehaviour)this).__registerRpc(1722453318u, new RpcReceiveHandler(__rpc_handler_1722453318), "PlayShredClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3509185095(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).DmgPlayerClientRpc(netid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3626191914(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); Vector3 launchVelocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref launchVelocity); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).KillPlayerClientRpc(netid, launchVelocity); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_721753425(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool active = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref active, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).ParticleSetClientRpc(active); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1570402476(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).PlayBounceClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2861241470(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool active = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref active, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).SparkSetClientRpc(active); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1722453318(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawProjectileV2)(object)target).PlayShredClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SawProjectileV2"; } } internal class SawTurret : NetworkBehaviour { public AudioSource AudioSawTurretOn; public AudioSource AudioLaunchSaw; public AudioSource AudioPowerDown; public GameObject ActivationGroup; public PlayerControllerB TargetPlayer; public Transform SawSpawnPoint; private bool Reloading = false; public GameObject VisibleSawBlade; public AudioSource AudioReload; public AudioSource AudioDoneReloading; private float TimeUntilDoneReloading = 0f; private int CurrentAmmo = 0; internal Animator animator; private bool On = false; private float WindUpVolumeMultiplier = 0f; public BoxCollider ShiftColliderArea; public float TimeUntilEnabled = -1f; public bool AnimationToggle = false; public bool Inactive = false; private float WindTime = 0f; private float CooldownTime = 0f; public static float ycorrect = 90f; public static float zcorrect = 90f; public void Start() { ActivationGroup.SetActive(false); VisibleSawBlade.SetActive(true); animator = ((Component)this).GetComponent(); AudioSawTurretOn.volume = Plugin.SawVolume.Value / 1.35f; AudioLaunchSaw.volume = Plugin.SawVolume.Value / 1.35f; AudioReload.volume = Plugin.SawVolume.Value / 1.35f; AudioDoneReloading.volume = Plugin.SawVolume.Value / 1.35f; AudioPowerDown.volume = Plugin.SawVolume.Value / 1.2f; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { PositionShiftForFiring(); } } public void PositionShiftForFiring() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) Collider shiftColliderArea = (Collider)(object)ShiftColliderArea; if ((Object)(object)shiftColliderArea == (Object)null) { return; } Bounds bounds = shiftColliderArea.bounds; Vector3 extents = ((Bounds)(ref bounds)).extents; LayerMask val = LayerMask.op_Implicit(StartOfRound.Instance.collidersAndRoomMaskAndDefault); Vector3[] array = (Vector3[])(object)new Vector3[4] { ((Component)this).transform.forward, -((Component)this).transform.forward, ((Component)this).transform.right, -((Component)this).transform.right }; NavMeshHit val4 = default(NavMeshHit); foreach (Vector3 val2 in array) { for (float num = 0.2f; num <= 3f; num += 0.2f) { Vector3 val3 = ((Component)this).transform.position + val2 * num; if (NavMesh.SamplePosition(val3, ref val4, 0.35f, -1) && !Physics.CheckBox(((NavMeshHit)(ref val4)).position + Vector3.up * 0.5f, extents, Quaternion.identity, LayerMask.op_Implicit(val), (QueryTriggerInteraction)1)) { ((Component)this).transform.position = ((NavMeshHit)(ref val4)).position; return; } } } } public void TerminalDisableTurretMethod() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { TerminalToggleClientRpc(turnOn: false); } else { TerminalToggleServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void TerminalToggleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1776018712u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1776018712u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalToggleClientRpc(turnOn: false); } } } [ClientRpc] public void TerminalToggleClientRpc(bool turnOn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1118373464u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turnOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1118373464u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (turnOn) { TimeUntilEnabled = -1f; AnimationToggle = false; Inactive = false; } else { TimeUntilEnabled = 7f; AnimationToggle = true; Inactive = true; AudioPowerDown.Play(); } } } public void Update() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { OnOffConditional(); } AudioSawTurretOn.volume = Plugin.SawVolume.Value * WindUpVolumeMultiplier; if (On) { if (((NetworkBehaviour)RoundManager.Instance).IsHost && !AudioSawTurretOn.isPlaying) { ToggleTurretOnClientRpc(on: true); } if (WindUpVolumeMultiplier < 1f) { WindUpVolumeMultiplier += Plugin.SawWindupTime.Value * Time.deltaTime; } AITick(); } else { if (((NetworkBehaviour)RoundManager.Instance).IsHost && AudioSawTurretOn.isPlaying) { ToggleTurretOnClientRpc(on: false); } if (WindUpVolumeMultiplier > 0.25f) { WindUpVolumeMultiplier -= Plugin.SawWindupTime.Value * Time.deltaTime; } } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (TimeUntilDoneReloading < 0f && Reloading) { Reloading = false; PlayFinishReloadingClientRpc(); CurrentAmmo = Plugin.SawAmmo.Value; } else if (!Reloading && CurrentAmmo <= 0) { Reloading = true; TimeUntilDoneReloading = Plugin.SawReloadTime.Value; PlayReloadingClientRpc(); } } AnimatorStateInfo currentAnimatorStateInfo; if (TimeUntilEnabled < 0f && AnimationToggle) { AnimationToggle = false; currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("ToEnabled")) { PlayTurnOnClientRpc(); } } if (Inactive && TimeUntilEnabled < 0f) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("ToEnabled")) { TerminalToggleClientRpc(turnOn: true); } } TimeUntilDoneReloading -= Time.deltaTime; WindTime += Time.deltaTime; CooldownTime -= Time.deltaTime; TimeUntilEnabled -= Time.deltaTime; } [ClientRpc] public void PlayTurnOnClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2750214402u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2750214402u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.Play("ToEnabled"); } } } [ClientRpc] public void PlayReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1163919899u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1163919899u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioReload.Play(); VisibleSawBlade.SetActive(false); } } } [ClientRpc] public void PlayFinishReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3054136098u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3054136098u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioDoneReloading.Play(); AudioReload.Stop(); VisibleSawBlade.SetActive(true); } } } public void OnOffConditional() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) float num = Plugin.SawTargetRange.Value; PlayerControllerB val = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val2 in array) { if (!((Object)(object)val2 == (Object)null) && !val2.isPlayerDead) { Vector3 val3 = ((Component)this).transform.position + Vector3.up * 1.2f; Vector3 position = ((Component)val2.gameplayCamera).transform.position; float num2 = Vector3.Distance(val3, position); if (!(num2 > Plugin.SawTargetRange.Value) && !Physics.Linecast(val3, position, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1) && num2 < num) { num = num2; val = val2; } } } if ((Object)(object)val != (Object)null && CurrentAmmo > 0 && !Inactive) { if ((Object)(object)TargetPlayer != (Object)(object)val) { } SetTargetPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId); TurnOnClientRpc(value: true); } else { SetTargetPlayerClientRpc(9999999uL); TurnOnClientRpc(value: false); WindTime = 0f; CooldownTime = 0f; } } [ClientRpc] public void TurnOnClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3337074398u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3337074398u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; On = value; } } } [ClientRpc] public void SetTargetPlayerClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(10035545u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 10035545u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (netid == 9999999) { TargetPlayer = null; return; } PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (!((Object)(object)val3 == (Object)null) && !val3.isPlayerDead && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { TargetPlayer = val3; } } } public void AITick() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) facePosition(((Component)TargetPlayer).transform.position); if (((NetworkBehaviour)RoundManager.Instance).IsHost && WindTime > Plugin.SawWindupTime.Value && CooldownTime < 0f) { CooldownTime = Plugin.SawFirerate.Value; Fire(); } } public void Fire() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)TargetPlayer).transform.position - SawSpawnPoint.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized); Vector3 val2 = ((num <= 30f) ? normalized : ((Component)this).transform.forward); Quaternion val3 = Quaternion.LookRotation(val2, Vector3.up); Quaternion val4 = Quaternion.Euler(0f, ycorrect, zcorrect); Quaternion val5 = val3 * val4; GameObject val6 = Object.Instantiate(Plugin.SawPrefab, SawSpawnPoint.position, val5); val6.GetComponent().LaunchForce = val2 * Plugin.SawLaunchSpeed.Value; val6.GetComponent().SetScale(((Component)this).transform.localScale.y); val6.GetComponent().Spawn(false); PlayLaunchSoundClientRpc(); CurrentAmmo--; } [ClientRpc] public void PlayLaunchSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2311595664u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2311595664u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioLaunchSaw.Play(); } } } [ClientRpc] public void ToggleTurretOnClientRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1523838289u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1523838289u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (on) { AudioSawTurretOn.Play(); ActivationGroup.SetActive(true); animator.Play("On"); } else { AudioSawTurretOn.Stop(); ActivationGroup.SetActive(false); animator.Play("Off"); } } } public void facePosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - ((Component)this).transform.position; val.y = 0f; if (val != Vector3.zero) { Quaternion val2 = Quaternion.LookRotation(val); Quaternion rotation = ((Component)this).transform.rotation; float num = Mathf.MoveTowardsAngle(((Quaternion)(ref rotation)).eulerAngles.y, ((Quaternion)(ref val2)).eulerAngles.y, Time.deltaTime * Plugin.SawRotationSpeed.Value); ((Component)this).transform.rotation = Quaternion.Euler(0f, num, 0f); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1776018712u, new RpcReceiveHandler(__rpc_handler_1776018712), "TerminalToggleServerRpc"); ((NetworkBehaviour)this).__registerRpc(1118373464u, new RpcReceiveHandler(__rpc_handler_1118373464), "TerminalToggleClientRpc"); ((NetworkBehaviour)this).__registerRpc(2750214402u, new RpcReceiveHandler(__rpc_handler_2750214402), "PlayTurnOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(1163919899u, new RpcReceiveHandler(__rpc_handler_1163919899), "PlayReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3054136098u, new RpcReceiveHandler(__rpc_handler_3054136098), "PlayFinishReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3337074398u, new RpcReceiveHandler(__rpc_handler_3337074398), "TurnOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(10035545u, new RpcReceiveHandler(__rpc_handler_10035545), "SetTargetPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2311595664u, new RpcReceiveHandler(__rpc_handler_2311595664), "PlayLaunchSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(1523838289u, new RpcReceiveHandler(__rpc_handler_1523838289), "ToggleTurretOnClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1776018712(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).TerminalToggleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1118373464(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool turnOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turnOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).TerminalToggleClientRpc(turnOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2750214402(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).PlayTurnOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1163919899(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).PlayReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3054136098(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).PlayFinishReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3337074398(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).TurnOnClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_10035545(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong targetPlayerClientRpc = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).SetTargetPlayerClientRpc(targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2311595664(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).PlayLaunchSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1523838289(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool on = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref on, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SawTurret)(object)target).ToggleTurretOnClientRpc(on); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SawTurret"; } } internal class SawTurretSpawnCurves { public static readonly AnimationCurve WeakCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.SawSpawnrate.Value), new Keyframe(0.4f, 1f * Plugin.SawSpawnrate.Value), new Keyframe(0.7f, 3f * Plugin.SawSpawnrate.Value), new Keyframe(0.9f, 5f * Plugin.SawSpawnrate.Value), new Keyframe(0.97f, 6f * Plugin.SawSpawnrate.Value), new Keyframe(1f, 8f * Plugin.SawSpawnrate.Value) }); public static readonly AnimationCurve NormalCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.SawSpawnrate.Value), new Keyframe(0.4f, 2f * Plugin.SawSpawnrate.Value), new Keyframe(0.7f, 5f * Plugin.SawSpawnrate.Value), new Keyframe(0.9f, 8f * Plugin.SawSpawnrate.Value), new Keyframe(0.97f, 10f * Plugin.SawSpawnrate.Value), new Keyframe(1f, 15f * Plugin.SawSpawnrate.Value) }); public static readonly AnimationCurve AggressiveCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(0f, 0f * Plugin.SawSpawnrate.Value), new Keyframe(0.4f, 5f * Plugin.SawSpawnrate.Value), new Keyframe(0.7f, 7f * Plugin.SawSpawnrate.Value), new Keyframe(0.9f, 8f * Plugin.SawSpawnrate.Value), new Keyframe(0.97f, 15f * Plugin.SawSpawnrate.Value), new Keyframe(1f, 35f * Plugin.SawSpawnrate.Value) }); } public class LRADTurret : NetworkBehaviour { public AudioSource AudioLRADOn; public AudioSource AudioFire; public AudioSource AudioPowerDown; public GameObject ActivationGroup; public PlayerControllerB TargetPlayer; public Transform RotationPoint; public Transform WaveSpawnPoint1; public Transform WaveSpawnPoint2; private bool Reloading = false; public AudioSource AudioReload; public AudioSource AudioDoneReloading; private float TimeUntilDoneReloading = 0f; private int CurrentAmmo = 0; public Transform SpeakerTransform; public static Random rnd = new Random(); private bool On = false; public static int EntranceTendency = 6; public float TimeUntilEnabled = -1f; private float WindTime = 0f; private float CooldownTime = 0f; private Vector3 LastKnownPosition = Vector3.zero; public static float SoundWaveSpeed = 50f; public static float ycorrect = 90f; public static float zcorrect = 90f; private bool executingCoroutine = false; private float faceTransitionTime = 3.2f; public AudioSource upTransitionSound; public AudioSource downTransitionSound; private bool hasFiredOnce = false; public void Start() { TimeUntilDoneReloading = Plugin.LRADReloadTime.Value; ActivationGroup.SetActive(false); AudioLRADOn.volume = Plugin.LRADVolume.Value; AudioFire.volume = Plugin.LRADVolume.Value; AudioReload.volume = Plugin.LRADVolume.Value; AudioDoneReloading.volume = Plugin.LRADVolume.Value; AudioPowerDown.volume = Plugin.LRADVolume.Value; upTransitionSound.volume = Plugin.LRADVolume.Value; downTransitionSound.volume = Plugin.LRADVolume.Value; AudioLRADOn.pitch = 5.53f / Plugin.LRADChargeTime.Value; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ProjectToRandomOutsideLocation(); } } public void ProjectToRandomOutsideLocation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) Vector3 pos = ((Component)this).transform.position; float num = 99999f; NavMeshHit val3 = default(NavMeshHit); for (int i = 0; i < EntranceTendency; i++) { GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; GameObject val = outsideAINodes[rnd.Next(0, outsideAINodes.Length)]; Vector3 val2 = val.transform.position + new Vector3((float)rnd.Next(-5, 5), (float)rnd.Next(-5, 5), (float)rnd.Next(-5, 5)); Vector3 val4 = ((!NavMesh.SamplePosition(val2, ref val3, 20f, -1)) ? val.transform.position : ((NavMeshHit)(ref val3)).position); float num2 = DistanceToEntrance(val4); if (num2 < num) { num = num2; pos = val4; } } ForwardPositionClientRpc(pos); } [ClientRpc] public void ForwardPositionClientRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3554099905u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3554099905u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).transform.position = pos; } } } public void TerminalDisableTurretMethod() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { TerminalToggleClientRpc(turnOn: false); } else { TerminalToggleServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void TerminalToggleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2619371733u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2619371733u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalToggleClientRpc(turnOn: false); } } } [ClientRpc] public void TerminalToggleClientRpc(bool turnOn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1212330900u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turnOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1212330900u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (turnOn) { TimeUntilEnabled = -1f; return; } AudioPowerDown.Play(); TimeUntilEnabled = 7f; } } public float DistanceToEntrance(Vector3 pos) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) float num = 9999f; EntranceTeleport[] array = Object.FindObjectsOfType(); EntranceTeleport[] array2 = array; foreach (EntranceTeleport val in array2) { float num2 = Vector3.Distance(pos, ((Component)val).transform.position); if (num2 < num) { num = num2; } } return num; } public void Update() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { OnOffConditional(); } if (AudioLRADOn.pitch != 1f) { AudioLRADOn.pitch = 1f; } if (On) { if (((NetworkBehaviour)RoundManager.Instance).IsHost && !AudioLRADOn.isPlaying) { ToggleTurretOnClientRpc(on: true); } AITick(); } else if (((NetworkBehaviour)RoundManager.Instance).IsHost && AudioLRADOn.isPlaying) { ToggleTurretOnClientRpc(on: false); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (TimeUntilDoneReloading < 0f && Reloading) { Reloading = false; PlayFinishReloadingClientRpc(); CurrentAmmo = 1; } else if (!Reloading && CurrentAmmo <= 0) { Reloading = true; TimeUntilDoneReloading = Plugin.LRADReloadTime.Value; PlayReloadingClientRpc(); } } TimeUntilDoneReloading -= Time.deltaTime; WindTime += Time.deltaTime; CooldownTime -= Time.deltaTime; } [ClientRpc] public void PlayReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(971006013u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 971006013u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioReload.Play(); } } } [ClientRpc] public void PlayFinishReloadingClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1448071703u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1448071703u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioDoneReloading.Play(); AudioReload.Stop(); } } } public void OnOffConditional() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) float num = Plugin.LRADTargetRange.Value; PlayerControllerB val = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val2 in array) { if (!((Object)(object)val2 == (Object)null) && !val2.isPlayerDead) { Vector3 val3 = ((Component)this).transform.position + Vector3.up * 1.2f; Vector3 position = ((Component)val2.gameplayCamera).transform.position; float num2 = Vector3.Distance(val3, position); if (!(num2 > Plugin.LRADTargetRange.Value) && !Physics.Linecast(val3, position, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1) && num2 < num) { num = num2; val = val2; } } } if (CurrentAmmo <= 0 && TimeUntilDoneReloading <= faceTransitionTime && !executingCoroutine) { Debug.Log((object)("notifyStatusChange DOWN: currentAmmo: " + CurrentAmmo + " TimeUntilDoneReloading: " + TimeUntilDoneReloading + " faceTransitionTime: " + faceTransitionTime)); executingCoroutine = true; notifyStatusChange(isUp: false); } if (CurrentAmmo <= 0 && TimeUntilDoneReloading >= Plugin.LRADReloadTime.Value - 1f && !executingCoroutine) { Debug.Log((object)("notifyStatusChange UP: currentAmmo: " + CurrentAmmo + " TimeUntilDoneReloading: " + TimeUntilDoneReloading + " LRADCOUNTER: " + (Plugin.LRADReloadTime.Value - 1f))); executingCoroutine = true; notifyStatusChange(isUp: true); } if ((Object)(object)val != (Object)null && CurrentAmmo > 0 && TimeUntilEnabled <= 0f) { if ((Object)(object)TargetPlayer != (Object)(object)val) { } SetTargetPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId); TurnOnClientRpc(value: true); } else if ((double)AudioLRADOn.time > (double)Plugin.LRADChargeTime.Value / 2.6 && CurrentAmmo > 0 && TimeUntilEnabled <= 0f) { SetTargetPlayerClientRpc(9999999uL); TurnOnClientRpc(value: true); } else { SetTargetPlayerClientRpc(9999999uL); TurnOnClientRpc(value: false); WindTime = 0f; CooldownTime = 0f; } } [ClientRpc] public void TurnOnClientRpc(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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3223642318u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3223642318u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; On = value; } } } [ClientRpc] public void SetTargetPlayerClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1619782782u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1619782782u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (netid == 9999999) { TargetPlayer = null; return; } PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (!((Object)(object)val3 == (Object)null) && !val3.isPlayerDead && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { TargetPlayer = val3; } } } public void AITick() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)TargetPlayer)) { facePosition(((Component)TargetPlayer).transform.position); LastKnownPosition = ((Component)TargetPlayer).transform.position; } if (((NetworkBehaviour)RoundManager.Instance).IsHost && AudioLRADOn.time > Plugin.LRADChargeTime.Value && CooldownTime < 0f) { CooldownTime = 0.1f; Fire(); } } public void Fire() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (Object.op_Implicit((Object)(object)TargetPlayer) ? ((Component)TargetPlayer).transform.position : LastKnownPosition); Vector3 val2 = new Vector3(RotationPoint.forward.x, 0f, RotationPoint.forward.z); Vector3 normalized = ((Vector3)(ref val2)).normalized; float num = (val.y - WaveSpawnPoint1.position.y) / Vector3.Distance(((Component)this).transform.position, val); val2 = normalized + Vector3.up * num; Vector3 normalized2 = ((Vector3)(ref val2)).normalized; Quaternion val3 = Quaternion.LookRotation(normalized2, Vector3.up); Quaternion val4 = Quaternion.Euler(0f, ycorrect, zcorrect); Quaternion rot = val3 * val4; SpawnWave(rot, WaveSpawnPoint1.position); SpawnWave(rot, WaveSpawnPoint2.position); PlayLaunchSoundClientRpc(); CurrentAmmo--; hasFiredOnce = true; } private void SpawnWave(Quaternion rot, Vector3 pos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(Plugin.LRADBlastPrefab, pos, rot); SoundProjectile component = val.GetComponent(); component.HostObject = this; component.SetVelocity(val.transform.up * SoundWaveSpeed); val.GetComponent().Spawn(false); } [ClientRpc] public void PlayLaunchSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3678127293u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3678127293u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioFire.Play(); } } } [ClientRpc] public void ToggleTurretOnClientRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1641157642u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1641157642u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (on) { AudioLRADOn.Play(); ActivationGroup.SetActive(true); } else { AudioLRADOn.Stop(); ActivationGroup.SetActive(false); } } } [ClientRpc] public void upAnimationClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2825479014u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2825479014u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(FaceUpCoroutine()); } } } [ClientRpc] public void downAnimationClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2600711856u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2600711856u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(FaceDownCoroutine()); } } } public IEnumerator FaceUpCoroutine() { Debug.Log((object)"Devious Traps LRAD: Face up coroutine"); yield return (object)new WaitForSeconds(1f); upTransitionSound.Play(); float start = 0f; float end = -60f; for (int i = 0; i <= 60; i++) { float t = (float)i / 60f; float angle = Mathf.Lerp(start, end, t); SpeakerTransform.localRotation = Quaternion.Euler(angle, 0f, 0f); yield return (object)new WaitForSeconds(faceTransitionTime / 60f); } Debug.Log((object)"Devious Traps LRAD: Face up coroutine execution done"); executingCoroutine = false; yield return (object)new WaitForSeconds(0.1f); } public async void notifyStatusChange(bool isUp) { Debug.Log((object)"NotifyStatusChange"); if (isUp) { if (Plugin.LRADReloadTime.Value > faceTransitionTime * 2f + 1f) { upAnimationClientRpc(); } } else if (Plugin.LRADReloadTime.Value > faceTransitionTime * 2f + 1f) { downAnimationClientRpc(); } } public IEnumerator FaceDownCoroutine() { Debug.Log((object)"Devious Traps LRAD: Face down coroutine"); downTransitionSound.Play(); float start = -60f; float end = 0f; for (int i = 0; i <= 60; i++) { float t = (float)i / 60f; float angle = Mathf.Lerp(start, end, t); SpeakerTransform.localRotation = Quaternion.Euler(angle, 0f, 0f); yield return (object)new WaitForSeconds(faceTransitionTime / 60f); } Debug.Log((object)"Devious Traps LRAD: Face down coroutine execution done"); executingCoroutine = false; yield return (object)new WaitForSeconds(0.1f); } public void facePosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - ((Component)this).transform.position; val.y = 0f; if (val != Vector3.zero) { Quaternion val2 = Quaternion.LookRotation(val); Quaternion rotation = RotationPoint.rotation; float num = Mathf.MoveTowardsAngle(((Quaternion)(ref rotation)).eulerAngles.y, ((Quaternion)(ref val2)).eulerAngles.y, Plugin.LRADRotationSpeed.Value * Time.deltaTime); RotationPoint.rotation = Quaternion.Euler(0f, num, 0f); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3554099905u, new RpcReceiveHandler(__rpc_handler_3554099905), "ForwardPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(2619371733u, new RpcReceiveHandler(__rpc_handler_2619371733), "TerminalToggleServerRpc"); ((NetworkBehaviour)this).__registerRpc(1212330900u, new RpcReceiveHandler(__rpc_handler_1212330900), "TerminalToggleClientRpc"); ((NetworkBehaviour)this).__registerRpc(971006013u, new RpcReceiveHandler(__rpc_handler_971006013), "PlayReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(1448071703u, new RpcReceiveHandler(__rpc_handler_1448071703), "PlayFinishReloadingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3223642318u, new RpcReceiveHandler(__rpc_handler_3223642318), "TurnOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(1619782782u, new RpcReceiveHandler(__rpc_handler_1619782782), "SetTargetPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3678127293u, new RpcReceiveHandler(__rpc_handler_3678127293), "PlayLaunchSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(1641157642u, new RpcReceiveHandler(__rpc_handler_1641157642), "ToggleTurretOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(2825479014u, new RpcReceiveHandler(__rpc_handler_2825479014), "upAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(2600711856u, new RpcReceiveHandler(__rpc_handler_2600711856), "downAnimationClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3554099905(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).ForwardPositionClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2619371733(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).TerminalToggleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1212330900(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool turnOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turnOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).TerminalToggleClientRpc(turnOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_971006013(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).PlayReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1448071703(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).PlayFinishReloadingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3223642318(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).TurnOnClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1619782782(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong targetPlayerClientRpc = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).SetTargetPlayerClientRpc(targetPlayerClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3678127293(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).PlayLaunchSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1641157642(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool on = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref on, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).ToggleTurretOnClientRpc(on); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2825479014(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).upAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2600711856(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LRADTurret)(object)target).downAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LRADTurret"; } } } namespace DeviousTraps.src.SoundCannon { public class DeafnessListenerFilter : MonoBehaviour { public float Deafness = 0f; private void OnAudioFilterRead(float[] data, int channels) { for (int i = 0; i < data.Length; i++) { data[i] *= 1f - Math.Min(1f, Deafness); } } } public class ImpactFXState : NetworkBehaviour { public Image InitialHitEffect; public Image PainAuraEffect; public Animator PainAuraAnimator; public Image StaticEffect; public Animator StaticEffectAnimator; public Image GlitchEffect; public Animator GlitchAnimator; private float Power = 1f; private float TimeToEnd = 20f; private float max_TimeToEnd = 20f; public Random rnd = new Random(); public AudioSource SoundImpact; public AudioSource SoundGlitch; public AudioSource SoundNoise; public static List Instances; public DeafnessListenerFilter filter; private ulong pid = 999999999uL; private bool spawned = false; public static float GlitchChancePerStep = 0.05f; public static float GlitchCheckDelay = 0.25f; public static float max_GlitchCheckDelay = 0.25f; public static float TotalDeafness = 300f; public static float DrunkPushChancePerStepBase = 1f; public static float DrunkPushMaxForce = 3f; public static float DrunkInitial = 1.3f; public static float GlitchDurationModifier = 0.005f; public static float AvgGlitchStrengthModifier = 2.5f; public static float AvgGlitchVolumeModifier = 1f; public void Start() { if (Object.op_Implicit((Object)(object)SoundImpact)) { SoundImpact.volume = Plugin.LRADFXVolume.Value; } if (Object.op_Implicit((Object)(object)SoundNoise)) { SoundNoise.volume = Plugin.LRADFXVolume.Value; } TimeToEnd = Plugin.LRADDisorientPeriod.Value; max_TimeToEnd = Plugin.LRADDisorientPeriod.Value; } public void AttachToPlayer(ulong uid) { if (Instances == null) { Instances = new List(); } Power = 1f; TimeToEnd = Plugin.LRADDisorientPeriod.Value; pid = uid; Debug.Log((object)("Devious Traps: LRAD Impact State attached to the player with uid: " + uid)); DestroyStep(); Instances.Add(this); } public void DestroyStep() { GameObject val = null; if (Instances == null) { Instances = new List(); } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } foreach (ImpactFXState instance in Instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)((Component)instance).gameObject) && instance.pid == pid && (Object)(object)instance != (Object)(object)this) { val = ((Component)instance).gameObject; Debug.Log((object)"Devious Traps: Detached LRAD Impact State to replace with current instance"); } } if (Object.op_Implicit((Object)(object)val)) { Object.Destroy((Object)(object)val); } } public override void OnNetworkSpawn() { if (pid != 999999999 && ((NetworkBehaviour)RoundManager.Instance).IsHost) { NotifyUsersOfEffectClientRpc(pid); } } [ClientRpc] public void NotifyUsersOfEffectClientRpc(ulong NewPid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(34311322u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, NewPid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 34311322u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pid = NewPid; PlayInitialHitClientRpc(pid); spawned = true; } } } public void Update() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) if (!spawned || !LocalCheck(pid)) { return; } TimeToEnd -= Time.deltaTime; GlitchCheckDelay -= Time.deltaTime; Power = TimeToEnd / max_TimeToEnd; if (!SoundGlitch.isPlaying) { SoundGlitch.Play(); SoundGlitch.volume = 0f; } ((Graphic)StaticEffect).color = new Color(1f, 1f, 1f, Power / 2f * Plugin.LRADFXMult.Value); PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; localPlayerController.drunkness = Plugin.LRADDrunknessMult.Value * Power; if (Object.op_Implicit((Object)(object)filter)) { filter.Deafness = Math.Clamp(Power * 3f, 0f, 1f); } else { Debug.Log((object)"Devious Traps IMPACT FX waiting for filter to spawn for deafness simulation"); } if (localPlayerController.isPlayerDead) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (Power < 0f && LocalCheck(pid)) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (GlitchCheckDelay < 0f) { DestroyStep(); if (rnd.NextDouble() < (double)GlitchChancePerStep) { ((MonoBehaviour)this).StartCoroutine(PlayGlitchCoroutine()); } if (rnd.NextDouble() < (double)(DrunkPushChancePerStepBase * Power)) { float num = (float)(rnd.NextDouble() * (double)DrunkPushMaxForce * (double)Math.Sign(rnd.NextDouble() - 0.5)); float num2 = (float)(rnd.NextDouble() * (double)DrunkPushMaxForce * (double)Math.Sign(rnd.NextDouble() - 0.5)); float num3 = (float)(rnd.NextDouble() * (double)DrunkPushMaxForce * (double)Math.Sign(rnd.NextDouble() - 0.5)); localPlayerController.externalForceAutoFade = new Vector3(num, num2, num3) + localPlayerController.externalForceAutoFade * Plugin.LRADDizzyMult.Value; } GlitchCheckDelay = max_GlitchCheckDelay; } } public PlayerControllerB GetPlayer(ulong netid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (((NetworkBehaviour)val).NetworkObjectId == netid) { return val; } } return null; } public bool LocalCheck(ulong uid) { if (((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObjectId == uid) { return true; } return false; } [ClientRpc] public void PlayInitialHitClientRpc(ulong uid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3318378669u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3318378669u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (LocalCheck(uid)) { ((MonoBehaviour)this).StartCoroutine(PlayInitialHitCoroutine()); spawned = true; } } } public IEnumerator PlayInitialHitCoroutine() { Debug.Log((object)("IMPACTFXHIT: " + Plugin.LRADDisorientPeriod.Value + ": S")); if (Object.op_Implicit((Object)(object)SoundImpact)) { SoundImpact.volume = Plugin.LRADFXVolume.Value; } if (Object.op_Implicit((Object)(object)SoundNoise)) { SoundNoise.volume = Plugin.LRADFXVolume.Value; } TimeToEnd = Plugin.LRADDisorientPeriod.Value; max_TimeToEnd = Plugin.LRADDisorientPeriod.Value; SoundImpact.Play(); PlayerControllerB ply = RoundManager.Instance.playersManager.localPlayerController; try { ply.drunkness = DrunkInitial * Plugin.LRADDrunknessMult.Value; AudioListener listener = ((Component)ply.gameplayCamera).GetComponentInChildren(); DeafnessListenerFilter deafnessListenerFilter = default(DeafnessListenerFilter); if (!((Component)listener).TryGetComponent(ref deafnessListenerFilter)) { filter = ((Component)listener).gameObject.AddComponent(); } else { DeafnessListenerFilter prev = default(DeafnessListenerFilter); ((Component)listener).TryGetComponent(ref prev); filter = prev; } } catch (Exception e) { Debug.LogError((object)e); } for (float i = 1f; i > 0f; i -= 0.05f) { ((Graphic)InitialHitEffect).color = new Color(1f, 1f, 1f, i * Plugin.LRADFXMult.Value); yield return (object)new WaitForSeconds(0.025f); } ((Graphic)InitialHitEffect).color = new Color(1f, 1f, 1f, 0f); } public void OnDestroy() { try { if (LocalCheck(pid)) { if (Object.op_Implicit((Object)(object)filter)) { filter.Deafness = 0f; } PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; localPlayerController.drunkness = 0f; AudioListener componentInChildren = ((Component)localPlayerController.gameplayCamera).GetComponentInChildren(); DeafnessListenerFilter deafnessListenerFilter = default(DeafnessListenerFilter); if (((Component)componentInChildren).TryGetComponent(ref deafnessListenerFilter)) { ((Component)componentInChildren).gameObject.GetComponent().Deafness = 0f; } } } catch (Exception ex) { Debug.LogException(ex); } } public IEnumerator PlayGlitchCoroutine() { float GlitchStartOpacity = (float)(rnd.NextDouble() * 0.05000000074505806 + 0.05) * Power * AvgGlitchStrengthModifier; float GlitchStartPitch = (float)(rnd.NextDouble() * 2.0); float GlitchVolume = Math.Min(GlitchStartOpacity / 0.1f * AvgGlitchVolumeModifier, 1f); if (Object.op_Implicit((Object)(object)SoundGlitch)) { SoundGlitch.volume = GlitchVolume * Plugin.LRADFXVolume.Value; SoundGlitch.pitch = GlitchStartPitch; } for (float i = GlitchStartOpacity; i > 0f; i -= GlitchDurationModifier) { ((Graphic)GlitchEffect).color = new Color(1f, 1f, 1f, i * Plugin.LRADFXMult.Value); yield return (object)new WaitForSeconds(0.025f); } ((Graphic)GlitchEffect).color = new Color(1f, 1f, 1f, 0f); SoundGlitch.volume = 0f; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(34311322u, new RpcReceiveHandler(__rpc_handler_34311322), "NotifyUsersOfEffectClientRpc"); ((NetworkBehaviour)this).__registerRpc(3318378669u, new RpcReceiveHandler(__rpc_handler_3318378669), "PlayInitialHitClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_34311322(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong newPid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref newPid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ImpactFXState)(object)target).NotifyUsersOfEffectClientRpc(newPid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3318378669(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ImpactFXState)(object)target).PlayInitialHitClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ImpactFXState"; } } public class SoundProjectile : NetworkBehaviour { public LRADTurret HostObject = null; public float LocalShakeCooldown = 0.2f; public float lifetime = 4f; private Vector3 Velocity = Vector3.zero; public void Start() { LocalProximityShake(); } public void SetVelocity(Vector3 _velocity) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Velocity = _velocity * Plugin.LRADProjectileSpeed.Value; } public void Update() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) lifetime -= Time.deltaTime; LocalShakeCooldown -= Time.deltaTime; if (LocalShakeCooldown < 0f) { LocalShakeCooldown = 0.2f; LocalProximityShake(); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).transform.position = ((Component)this).transform.position + Velocity * Time.deltaTime; if (lifetime <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public void LocalProximityShake() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; Vector3 position = ((Component)localPlayerController).gameObject.transform.position; Vector3 position2 = ((Component)this).transform.position; if (Vector3.Distance(position, position2) < 14f * (Plugin.LRADTargetRange.Value / 50f)) { HUDManager.Instance.ShakeCamera((ScreenShakeType)3); } else if (Vector3.Distance(position, position2) < 30f * (Plugin.LRADTargetRange.Value / 50f)) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (Vector3.Distance(position, position2) < 42f * (Plugin.LRADTargetRange.Value / 50f)) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } public void OnTriggerEnter(Collider other) { //IL_0085: 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) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); EnemyAI component2 = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int num = 20; if (num >= component.health) { KillPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId); } else { DmgPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId, num); GameObject val = Object.Instantiate(Plugin.LRADImpactPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); ImpactFXState component3 = val.GetComponent(); component3.AttachToPlayer(((NetworkBehaviour)component).NetworkObjectId); val.GetComponent().Spawn(false); } } if (Object.op_Implicit((Object)(object)component2)) { component2.HitEnemyClientRpc(6, -1, true, -1); } } [ClientRpc] public void DmgPlayerClientRpc(ulong netid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(43674565u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 43674565u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.DamagePlayer((int)((float)amount * Plugin.LRADDmgMult.Value), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } [ClientRpc] public void KillPlayerClientRpc(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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3016568542u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3016568542u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.KillPlayer(val3.playerRigidbody.velocity * 2f, true, (CauseOfDeath)3, 0, default(Vector3), false); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(43674565u, new RpcReceiveHandler(__rpc_handler_43674565), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3016568542u, new RpcReceiveHandler(__rpc_handler_3016568542), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_43674565(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((SoundProjectile)(object)target).DmgPlayerClientRpc(netid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3016568542(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); target.__rpc_exec_stage = (__RpcExecStage)1; ((SoundProjectile)(object)target).KillPlayerClientRpc(netid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SoundProjectile"; } } } namespace DeviousTraps.src.MouseTrap { public class ItemTriggerBox : NetworkBehaviour { public GrabbableObject attachedObject; public Vector3 fixedPos; public Quaternion fixedRot; private bool itemInitialized = false; private float refreshItemInitCooldown = 1000f; public void LinkItemToTrigger(GrabbableObject obj) { attachedObject = obj; obj.grabbable = false; } public void Start() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) try { BoxCollider component = ((Component)this).GetComponent(); Vector3 val = component.size * Plugin.MTrapScrapBaitForgiveness.Value; component.size_Injected = ref val; } catch (Exception ex) { Debug.LogError((object)ex); } } public void Update() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (Object.op_Implicit((Object)(object)attachedObject) && (Object)(object)attachedObject.playerHeldBy != (Object)null) { attachedObject.grabbable = true; attachedObject = null; } if ((!itemInitialized || refreshItemInitCooldown < 0f) && Object.op_Implicit((Object)(object)attachedObject) && ((Component)attachedObject).GetComponent().IsSpawned) { itemInitialized = true; AttachObjectClientRpc(((NetworkBehaviour)attachedObject).NetworkObjectId); refreshItemInitCooldown = 10000f; } refreshItemInitCooldown -= Time.deltaTime; } } public void OnTriggerEnter(Collider other) { if (((Component)this).gameObject.layer == LayerMask.NameToLayer("Triggers")) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB val = playerParentWalk(gameObject); StartOfRound playersManager = RoundManager.Instance.playersManager; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)attachedObject)) { attachedObject.grabbable = true; } } } [ClientRpc] public void AttachObjectClientRpc(ulong uid) { //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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0147: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1023408528u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1023408528u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val3 in array2) { if (uid == ((NetworkBehaviour)val3).NetworkObjectId) { attachedObject = val3; val3.grabbable = false; ((Component)val3).transform.localPosition = Vector3.zero; ((Component)val3).transform.parent = ((Component)((Component)this).transform.root).GetComponent().ScrapAttachment; val3.startFallingPosition = Vector3.zero; val3.targetFloorPosition = Vector3.zero; } } } public void OnTriggerExit(Collider other) { if (((Component)this).gameObject.layer == LayerMask.NameToLayer("Triggers")) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB val = playerParentWalk(gameObject); StartOfRound playersManager = RoundManager.Instance.playersManager; if (Object.op_Implicit((Object)(object)val)) { attachedObject.grabbable = false; } } } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1023408528u, new RpcReceiveHandler(__rpc_handler_1023408528), "AttachObjectClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1023408528(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ItemTriggerBox)(object)target).AttachObjectClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ItemTriggerBox"; } } public class MouseTrap : NetworkBehaviour, IHittable { public enum ConnectedAnchorMode { ClosestPointOnBodyCollider, UpperSpine, LowerSpine, Head, HipsOrRoot, ArmsMetarig, AutoBest } public Animator animator; public AudioSource activateSound; public Rigidbody rigidBody; public SpringJoint springJoint; public BoxCollider collider; public static List instances = new List(); private float BigSize = 3f; private float MegaSize = 5f; private bool isMega = false; private bool isBig = false; public Transform ScrapAttachment; public static float LandmineForceSensitivity = 5f; public static float FlashForceSensitivity = 5f; public static float DistFalloff = 2f; public static float UpTendency = 0.37f; public static Random rnd = new Random(); public ItemTriggerBox triggerBox; public GrabbableObject localObj; public RemoveTrapBox removalHitbox; public BoxCollider removalCollider; private int Dmg = 0; public float BcontactOffset; public Vector3 Bsize; private static Vector3 GiantVectSize; private static Vector3 GiantVectCenter; private float teleportToPlayerThreshold = 5f; private bool activated = false; public PlayerControllerB stuckTo; public Transform attachmentPoint; public void Start() { try { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (rnd.NextDouble() < (double)(Plugin.GiantMTrapChance.Value / 100f)) { MakeGiantClientRpc(); AttachScrap(); } else if (rnd.NextDouble() < (double)(Plugin.BigMTrapChance.Value / 100f)) { MakeBigClientRpc(); } else { MakeSmallClientRpc(); } instances.Add(this); } } catch (Exception ex) { Debug.LogError((object)ex); } } [ClientRpc] public void MakeSmallClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3042285270u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3042285270u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Dmg = Plugin.SmallMTrapDmg.Value; } } } [ClientRpc] public void MakeBigClientRpc() { //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_00df: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(414462364u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 414462364u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).transform.localScale = new Vector3(BigSize, BigSize, BigSize); Dmg = Plugin.BigMTrapDmg.Value; AudioSource obj = activateSound; obj.pitch *= 0.5f; isBig = true; } } } [ClientRpc] public void MakeGiantClientRpc() { //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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2249903265u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2249903265u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).transform.localScale = new Vector3(MegaSize, MegaSize, MegaSize); Dmg = Plugin.GiantMTrapDmg.Value; AudioSource obj = activateSound; obj.pitch *= 0.25f; isBig = true; isMega = true; GiantVectSize = new Vector3(collider.size.x, collider.size.y * 0.5f, collider.size.z); GiantVectCenter = new Vector3(collider.center.x, collider.center.y * 0.285f, collider.center.z); collider.size_Injected = ref GiantVectSize; collider.center_Injected = ref GiantVectCenter; } } } public void Update() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)localObj) && ((NetworkBehaviour)RoundManager.Instance).IsHost && (Object)(object)triggerBox.attachedObject != (Object)null) { ((Component)localObj).transform.localPosition = Vector3.zero; ((Component)localObj).transform.parent = ScrapAttachment; localObj.startFallingPosition = Vector3.zero; localObj.targetFloorPosition = Vector3.zero; } if (Object.op_Implicit((Object)(object)stuckTo) && Vector3.Distance(((Component)stuckTo).transform.position, ((Component)this).transform.position) > teleportToPlayerThreshold) { ((Component)this).transform.position = ((Component)stuckTo).transform.position; } } public bool inBaitSet(GrabbableObject gobj) { string value = Plugin.MTrapWhitelist.Value; string[] array = value.Split(","); string[] array2 = array; foreach (string text in array2) { string value2 = text.ToLower().Trim(); if (Object.op_Implicit((Object)(object)gobj)) { ScanNodeProperties componentInChildren = ((Component)gobj).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && componentInChildren.headerText.ToLower().Trim().Contains(value2)) { return true; } } } return false; } public void AttachScrap() { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ScrapAttachment == (Object)null) { Debug.LogError((object)"MouseTrap: ScrapAttachment is null"); return; } GrabbableObject[] array = Resources.FindObjectsOfTypeAll(); List list = new List(); if (array == null || array.Length == 0) { Debug.LogWarning((object)"MouseTrap: No scrap options found"); return; } foreach (GrabbableObject val in array) { if ((Object)(object)val != (Object)null && inBaitSet(val)) { list.Add(val); } } GrabbableObject val2 = list[rnd.Next(0, list.Count)]; if (!((Object)(object)val2 == (Object)null)) { GrabbableObject val3 = Object.Instantiate(val2, ScrapAttachment.position, ScrapAttachment.rotation, ScrapAttachment); val3.scrapValue = rnd.Next(val3.itemProperties.minValue, val3.itemProperties.maxValue); if (Object.op_Implicit((Object)(object)((Component)val3).GetComponentInChildren())) { ((Component)val3).GetComponentInChildren().subText = "Value: " + val3.scrapValue; } NetworkObject val4 = default(NetworkObject); if (((NetworkBehaviour)this).IsServer && ((Component)val3).TryGetComponent(ref val4)) { val4.Spawn(false); } triggerBox.LinkItemToTrigger(val3); GrabbableObject component = ((Component)val3).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { localObj = component; } } } public void OnTriggerEnter(Collider other) { if (!activated && ((Component)this).gameObject.layer == LayerMask.NameToLayer("MapHazards") && (((Component)other).gameObject.layer == LayerMask.NameToLayer("Player") || ((Object)((Component)other).gameObject).name.ToLower().Contains("shin") || ((Object)((Component)other).gameObject).name.ToLower().Contains("thigh")) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB ply = playerParentWalk(gameObject); DmgEvent(ply); } } [ServerRpc(RequireOwnership = false)] public void DmgEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(273095394u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 273095394u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DmgEvent(null); } } } public void DmgEvent(PlayerControllerB ply) { if (activated) { return; } activated = true; if (Object.op_Implicit((Object)(object)ply)) { int dmg = Dmg; if (dmg >= ply.health) { KillPlayerClientRpc(((NetworkBehaviour)ply).NetworkObject.NetworkObjectId); Snap(ply, isDead: true); } else { DmgPlayerClientRpc(((NetworkBehaviour)ply).NetworkObject.NetworkObjectId, dmg); Snap(ply, isDead: false); } activated = true; } else { Snap(null, isDead: false); } } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public void Snap(PlayerControllerB player, bool isDead) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { PlaySnapAnimationClientRpc(); } if (Object.op_Implicit((Object)(object)player) && !isBig && !isMega && Plugin.SmallMTrapAttaches.Value) { SnapToPlayer(player); } } [ClientRpc] public void PlaySnapAnimationClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(603642159u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 603642159u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; activateSound.Play(); animator.Play("Activate"); } } } public void SnapToPlayer(PlayerControllerB player) { //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0171: 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) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"MouseTrap: SnapToPlayerBody"); if ((Object)(object)player == (Object)null) { return; } Rigidbody component = ((Component)player).GetComponent(); if ((Object)(object)component == (Object)null) { Debug.LogWarning((object)"MouseTrap: Player has no Rigidbody!"); return; } Rigidbody val = ((Component)this).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)this).gameObject.AddComponent(); } val.mass = 0.5f; val.drag = 0.2f; val.angularDrag = 0.05f; val.interpolation = (RigidbodyInterpolation)1; val.collisionDetectionMode = (CollisionDetectionMode)2; SpringJoint component2 = ((Component)this).GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } SpringJoint val2 = ((Component)this).gameObject.AddComponent(); ((Joint)val2).connectedBody = component; if ((Object)(object)attachmentPoint != (Object)null) { ((Joint)val2).anchor = ((Component)this).transform.InverseTransformPoint(attachmentPoint.position); } else { ((Joint)val2).anchor = Vector3.zero; } ((Joint)val2).autoConfigureConnectedAnchor = false; ((Joint)val2).anchor = (((Object)(object)attachmentPoint != (Object)null) ? ((Component)this).transform.InverseTransformPoint(attachmentPoint.position) : Vector3.zero); Vector3 trapAttachWorldPos = (((Object)(object)attachmentPoint != (Object)null) ? attachmentPoint.position : ((Component)this).transform.position); ((Joint)val2).connectedAnchor = ComputeConnectedAnchor(player, component, trapAttachWorldPos, ConnectedAnchorMode.ClosestPointOnBodyCollider); ((Joint)val2).autoConfigureConnectedAnchor = false; val2.spring = 80f; val2.damper = 8f; val2.minDistance = 0f; val2.maxDistance = 0.15f; val2.tolerance = 0.02f; Collider component3 = ((Component)this).GetComponent(); Collider component4 = ((Component)player).GetComponent(); if (Object.op_Implicit((Object)(object)component3) && Object.op_Implicit((Object)(object)component4)) { Physics.IgnoreCollision(component3, component4, true); } disableColliderClientRpc(((NetworkBehaviour)player).NetworkObjectId); ((Component)this).transform.position = (((Object)(object)attachmentPoint != (Object)null) ? attachmentPoint.position : ((Component)player).transform.position); if (!Object.op_Implicit((Object)(object)stuckTo)) { player.carryWeight += 0.05f; } stuckTo = player; ((Behaviour)triggerBox).enabled = false; removalHitbox.Activate(); ((Component)this).gameObject.layer = LayerMask.NameToLayer("InteractableObject"); springJoint = val2; rigidBody = val; BoxCollider val3 = ((Component)this).gameObject.AddComponent(); ((Collider)val3).enabled = true; ((Collider)val3).contactOffset = BcontactOffset; val3.size = Bsize; ((Collider)val3).isTrigger = true; } [ClientRpc] public void disableColliderClientRpc(ulong pid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3497087287u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, pid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3497087287u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB val3 = allPlayerScripts[0]; foreach (PlayerControllerB val4 in allPlayerScripts) { if (((NetworkBehaviour)val4).NetworkObjectId == pid) { val3 = val4; } } Collider[] components = ((Component)this).gameObject.GetComponents(); Collider[] components2 = ((Component)val3).gameObject.GetComponents(); if (components.Length == 0 || components2.Length == 0) { return; } for (int j = 0; j < components2.Length; j++) { try { for (int k = 0; k < components.Length; k++) { Debug.Log((object)("checking: " + ((object)components[k])?.ToString() + " to " + (object)components2[j])); if (!components[k].isTrigger) { Debug.Log((object)("ignorecollision: " + ((object)components[k])?.ToString() + " to " + (object)components2[j])); Physics.IgnoreCollision(components[k], components2[j], true); } } } catch (Exception ex) { Debug.LogError((object)ex); } } } public void OnDestroy() { if (Object.op_Implicit((Object)(object)stuckTo)) { PlayerControllerB obj = stuckTo; obj.carryWeight -= 0.05f; } } private Vector3 ComputeConnectedAnchor(PlayerControllerB player, Rigidbody playerRb, Vector3 trapAttachWorldPos, ConnectedAnchorMode mode) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)playerRb == (Object)null) { return Vector3.zero; } Transform val = null; Transform val2 = null; Transform val3 = null; Transform val4 = null; Transform val5 = null; try { val = TryGet(player.upperSpine); val2 = TryGet(player.lowerSpine); val3 = TryGet(player.playerGlobalHead); val4 = TryGet(player.thisPlayerBody); val5 = TryGet(player.playerModelArmsMetarig); } catch { } switch (mode) { case ConnectedAnchorMode.ClosestPointOnBodyCollider: return ClosestPointAnchor(); case ConnectedAnchorMode.UpperSpine: return TransformAnchor(val); case ConnectedAnchorMode.LowerSpine: return TransformAnchor(val2); case ConnectedAnchorMode.Head: return TransformAnchor(val3); case ConnectedAnchorMode.HipsOrRoot: return TransformAnchor(val4); case ConnectedAnchorMode.ArmsMetarig: return TransformAnchor(val5); default: if ((Object)(object)val != (Object)null) { return TransformAnchor(val); } if ((Object)(object)val2 != (Object)null) { return TransformAnchor(val2); } if ((Object)(object)val4 != (Object)null) { return TransformAnchor(val4); } if ((Object)(object)val3 != (Object)null) { return TransformAnchor(val3); } if ((Object)(object)val5 != (Object)null) { return TransformAnchor(val5); } return ClosestPointAnchor(); } Vector3 ClosestPointAnchor() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) Collider component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { Vector3 worldPoint2 = component.ClosestPoint(trapAttachWorldPos); return ToConnectedLocal(worldPoint2); } return ToConnectedLocal(playerRb.worldCenterOfMass); } Vector3 ToConnectedLocal(Vector3 worldPoint) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return ((Component)playerRb).transform.InverseTransformPoint(worldPoint); } Vector3 TransformAnchor(Transform t) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)t == (Object)null) { return ClosestPointAnchor(); } return ToConnectedLocal(t.position); } static Transform TryGet(Transform t) { return ((Object)(object)t != (Object)null) ? t : null; } } [ClientRpc] public void DmgPlayerClientRpc(ulong netid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(208441096u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 208441096u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); Snap(val3, isDead: false); } } } [ClientRpc] public void KillPlayerClientRpc(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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3743766138u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3743766138u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { val3.KillPlayer(val3.playerRigidbody.velocity, true, (CauseOfDeath)8, 0, default(Vector3), false); Snap(val3, isDead: true); } } } public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { Debug.Log((object)("Devious Traps: MouseTrap Hit -> playerWhoHit: " + ((object)playerWhoHit)?.ToString() + " hitID = " + hitID)); if (!Plugin.MTrapCanBeDisabled.Value) { return false; } if (!activated & ((NetworkBehaviour)RoundManager.Instance).IsHost) { DmgEvent(null); } else { DmgEventServerRpc(); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { removalHitbox.detachEventClientRpc(); } else { removalHitbox.detachEventServerRpc(); } if (Object.op_Implicit((Object)(object)playerWhoHit)) { return true; } return false; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3042285270u, new RpcReceiveHandler(__rpc_handler_3042285270), "MakeSmallClientRpc"); ((NetworkBehaviour)this).__registerRpc(414462364u, new RpcReceiveHandler(__rpc_handler_414462364), "MakeBigClientRpc"); ((NetworkBehaviour)this).__registerRpc(2249903265u, new RpcReceiveHandler(__rpc_handler_2249903265), "MakeGiantClientRpc"); ((NetworkBehaviour)this).__registerRpc(273095394u, new RpcReceiveHandler(__rpc_handler_273095394), "DmgEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(603642159u, new RpcReceiveHandler(__rpc_handler_603642159), "PlaySnapAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(3497087287u, new RpcReceiveHandler(__rpc_handler_3497087287), "disableColliderClientRpc"); ((NetworkBehaviour)this).__registerRpc(208441096u, new RpcReceiveHandler(__rpc_handler_208441096), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3743766138u, new RpcReceiveHandler(__rpc_handler_3743766138), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3042285270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).MakeSmallClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_414462364(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).MakeBigClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2249903265(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).MakeGiantClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_273095394(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).DmgEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_603642159(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).PlaySnapAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3497087287(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong pid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref pid); target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).disableColliderClientRpc(pid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_208441096(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).DmgPlayerClientRpc(netid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3743766138(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); target.__rpc_exec_stage = (__RpcExecStage)1; ((MouseTrap)(object)target).KillPlayerClientRpc(netid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MouseTrap"; } } public class MouseTrapSpawner : NetworkBehaviour { private int minTraps = 6; private int maxTraps = 9; public static Random rnd = new Random(); public static float minDistFromInstancesRatio = 0.02f; private float spawnCubeMinSize = 7f; private float spawnCubeMaxSize = 13f; private int maxAttempts = 3; public List spawnLocations = new List(); public void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Vector3 position = ((Component)this).transform.position; for (int i = 0; i < 2; i++) { SpawnTraps(position); } Vector3 position2 = RoundManager.Instance.insideAINodes[rnd.Next(0, RoundManager.Instance.insideAINodes.Length)].transform.position; for (int j = 0; j < 2; j++) { SpawnTraps(position2); } Vector3 position3 = RoundManager.Instance.insideAINodes[rnd.Next(0, RoundManager.Instance.insideAINodes.Length)].transform.position; for (int k = 0; k < 2; k++) { SpawnTraps(position3); } } } public void SpawnTraps(Vector3 pos) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) int num = rnd.Next(minTraps, maxTraps); float num2 = num; for (int i = 0; i < num; i++) { Quaternion rotation = Plugin.MouseTrapPrefab.transform.rotation; rotation = Quaternion.Euler(rotation.x, (float)(360.0 * rnd.NextDouble()), rotation.z); Vector3 val = PickSpawnPosition(pos); int num3 = maxAttempts - 1; while (val == Vector3.zero && num3 > 0) { val = PickSpawnPosition(pos); num3--; } if (val != Vector3.zero) { GameObject val2 = Object.Instantiate(Plugin.MouseTrapPrefab, val, rotation); val2.GetComponent().Spawn(false); spawnLocations.Add(val); } } } public Vector3 PickSpawnPosition(Vector3 pos) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) float num = (float)((double)spawnCubeMinSize + rnd.NextDouble() * (double)(spawnCubeMaxSize - spawnCubeMinSize)); float num2 = (float)((double)(num / 2f) - rnd.NextDouble() * (double)num); float num3 = (float)((double)(num / 2f) - rnd.NextDouble() * (double)num); float num4 = (float)((double)(num / 2f) - rnd.NextDouble() * (double)num); NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(new Vector3(pos.x + num2, pos.y, pos.z + num4), ref val, num * 3f, -1) && withinProximity(((NavMeshHit)(ref val)).position, num)) { return ((NavMeshHit)(ref val)).position; } return Vector3.zero; } public bool withinProximity(Vector3 pos, float spawnCube) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < spawnLocations.Count; i++) { if (Vector3.Distance(pos, spawnLocations[i]) < spawnCube * minDistFromInstancesRatio) { return false; } } return true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "MouseTrapSpawner"; } } public class RemoveTrapBox : NetworkBehaviour { public MouseTrap TrapLink; public BoxCollider hitbox; public InteractTrigger trigger; public AudioSource detachSound; public void Start() { ((Behaviour)this).enabled = false; if (!Plugin.AttachmentWepRequired.Value && Object.op_Implicit((Object)(object)trigger)) { trigger.hoverTip = "Pry off Mousetrap"; } } public void Activate() { ((Behaviour)this).enabled = true; } public bool playerIsDefenseless(PlayerControllerB player) { if (!Plugin.AttachmentWepRequired.Value) { return false; } Debug.Log((object)("defenselesscheck: " + (object)player)); GrabbableObject[] itemSlots = player.ItemSlots; GrabbableObject val = itemSlots[player.currentItemSlot]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.itemProperties) && val.itemProperties.isDefensiveWeapon) { return false; } return true; } public void startDetachEvent() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { startDetachEventClientRpc(); } else { startDetachEventServerRpc(); } } public void detachEventCancel() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { detachCancelEventClientRpc(); } else { detachCancelEventServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void startDetachEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(648740657u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 648740657u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startDetachEventClientRpc(); } } } [ClientRpc] public void startDetachEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(190054393u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 190054393u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; detachSound.Play(); } } } [ServerRpc(RequireOwnership = false)] public void detachCancelEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4257735645u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4257735645u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; detachCancelEventClientRpc(); } } } [ClientRpc] public void detachCancelEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2189496488u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2189496488u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; detachSound.Stop(); } } } public void detachEvent(PlayerControllerB targetPlayer) { if ((Object)(object)targetPlayer == (Object)null) { Debug.LogError((object)"DeviousTraps: Detach event error. Player is null"); return; } Debug.Log((object)"Devious Traps: Mouse trap detach Event"); if (playerIsDefenseless(targetPlayer)) { Debug.Log((object)"Devious Traps: Mouse trap detach event failure, player not holding weapon"); HUDManager.Instance.DisplayTip("Trap Removal Failed", "You need a weapon to remove the mouse trap!", true, false, "LC_Tip1"); } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { detachEventClientRpc(); } else { detachEventServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void detachEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3093046577u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3093046577u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; detachEventClientRpc(); } } } [ClientRpc] public void detachEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1246604474u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1246604474u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Devious Traps: Mouse Trap Detach Event Successfull"); if (Object.op_Implicit((Object)(object)TrapLink.springJoint)) { Object.Destroy((Object)(object)TrapLink.springJoint); } if (Object.op_Implicit((Object)(object)TrapLink.stuckTo)) { PlayerControllerB stuckTo = TrapLink.stuckTo; stuckTo.carryWeight -= 0.05f; TrapLink.stuckTo = null; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(648740657u, new RpcReceiveHandler(__rpc_handler_648740657), "startDetachEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(190054393u, new RpcReceiveHandler(__rpc_handler_190054393), "startDetachEventClientRpc"); ((NetworkBehaviour)this).__registerRpc(4257735645u, new RpcReceiveHandler(__rpc_handler_4257735645), "detachCancelEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(2189496488u, new RpcReceiveHandler(__rpc_handler_2189496488), "detachCancelEventClientRpc"); ((NetworkBehaviour)this).__registerRpc(3093046577u, new RpcReceiveHandler(__rpc_handler_3093046577), "detachEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(1246604474u, new RpcReceiveHandler(__rpc_handler_1246604474), "detachEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_648740657(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).startDetachEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_190054393(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).startDetachEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4257735645(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).detachCancelEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2189496488(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).detachCancelEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3093046577(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).detachEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1246604474(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((RemoveTrapBox)(object)target).detachEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RemoveTrapBox"; } } } namespace EasterIsland { internal class ConfigModel { public static ConfigEntry moaiGlobalSize; public static ConfigEntry moaiGlobalMusicVol; public static ConfigEntry moaiGlobalRarity; public static ConfigEntry moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions)val).Min = 0.05f; ((BaseRangeOptions)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace DeviousTraps.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }