Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SnowyLib v1.11.0
Snowlance.SnowyLib.dll
Decompiled 14 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Dawn; using Dawn.Utils; using Dissonance; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Snowlance.SnowyLib.NetcodePatcher; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.SceneManagement; 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: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("Snowlance.SnowyLib")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.11.0.0")] [assembly: AssemblyInformationalVersion("1.11.0+5de28e93ebfc700a4d292e217db5748c7f9855a4")] [assembly: AssemblyProduct("SnowyLib")] [assembly: AssemblyTitle("Snowlance.SnowyLib")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.11.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [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 SnowyLib { [AttributeUsage(AttributeTargets.Method)] public sealed class InitConfigAttribute : Attribute { } internal static class InitConfigManager { public static void Initialize() { Assembly assembly = typeof(InitConfigAttribute).Assembly; string snowyLibName = assembly.GetName().Name; Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly2 in assemblies) { if (assembly2 == assembly) { ScanAssembly(assembly2); } else if (assembly2.GetReferencedAssemblies().Any((AssemblyName a) => a.Name == snowyLibName)) { ScanAssembly(assembly2); } } } private static void ScanAssembly(Assembly assembly) { foreach (Type loadableType in GetLoadableTypes(assembly)) { MethodInfo[] methods = loadableType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.IsDefined(typeof(InitConfigAttribute), inherit: false)) { if (methodInfo.ReturnType != typeof(void)) { throw new Exception(methodInfo.DeclaringType.FullName + "." + methodInfo.Name + " must return void."); } if (methodInfo.GetParameters().Length != 0) { throw new Exception(methodInfo.DeclaringType.FullName + "." + methodInfo.Name + " cannot have parameters."); } methodInfo.Invoke(null, null); } } } } private static IEnumerable<Type> GetLoadableTypes(Assembly assembly) { try { return assembly.GetTypes(); } catch (ReflectionTypeLoadException ex) { return ex.Types.Where((Type t) => t != null); } } } [AttributeUsage(AttributeTargets.Method)] public sealed class StaticUpdateAttribute : Attribute { } internal static class StaticUpdateManager { private static readonly List<Action> updates = new List<Action>(); public static void Initialize() { updates.Clear(); Assembly assembly = typeof(StaticUpdateManager).Assembly; string snowyLibName = assembly.GetName().Name; Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly2 in assemblies) { if (assembly2 == assembly) { ScanAssembly(assembly2); } else if (assembly2.GetReferencedAssemblies().Any((AssemblyName a) => a.Name == snowyLibName)) { ScanAssembly(assembly2); } } } private static void ScanAssembly(Assembly assembly) { foreach (Type loadableType in GetLoadableTypes(assembly)) { MethodInfo[] methods = loadableType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.IsDefined(typeof(StaticUpdateAttribute), inherit: false)) { if (methodInfo.ReturnType != typeof(void)) { throw new Exception(methodInfo.DeclaringType.FullName + "." + methodInfo.Name + " must return void."); } if (methodInfo.GetParameters().Length != 0) { throw new Exception(methodInfo.DeclaringType.FullName + "." + methodInfo.Name + " cannot have parameters."); } updates.Add((Action)Delegate.CreateDelegate(typeof(Action), methodInfo)); } } } } private static IEnumerable<Type> GetLoadableTypes(Assembly assembly) { try { return assembly.GetTypes(); } catch (ReflectionTypeLoadException ex) { return ex.Types.Where((Type t) => t != null); } } public static void Update() { foreach (Action update in updates) { update(); } } } public class AutoDictionary<TKey, TValue> : Dictionary<TKey, TValue> where TValue : new() { private readonly Func<TKey, TValue> _factory; public new TValue this[TKey key] { get { if (!TryGetValue(key, out var value)) { value = (base[key] = _factory(key)); } return value; } set { base[key] = value; } } public AutoDictionary(Func<TKey, TValue> factory) { _factory = factory; } } public static class ComponentExtensions { public static bool TryGetComponentInChildren<T>(this Component comp, out T? component) where T : Component { component = comp.GetComponentInChildren<T>(); return (Object)(object)component != (Object)null; } } public static class EnemyAIExtensions { public static StatusEffectController StatusEffectController(this EnemyAI enemy) { StatusEffectController statusEffectController = default(StatusEffectController); return ((Component)enemy).gameObject.TryGetComponent<StatusEffectController>(ref statusEffectController) ? statusEffectController : ((Component)enemy).gameObject.AddComponent<StatusEffectController>(); } public static bool TargetClosestEnemy(this EnemyAI thisEnemy, out EnemyAI? targetEnemy, EnemyAI? previousTargetEnemy, Func<EnemyAI, bool> enemyIsTargetable, float bufferDistance = 1.5f, bool requireLineOfSight = false, float viewWidth = 70f, bool doGroundCast = false, bool requirePath = false, bool checkForMineshaftStartTile = true) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) targetEnemy = previousTargetEnemy; thisEnemy.mostOptimalDistance = 2000f; EnemyAI val = targetEnemy; targetEnemy = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if (!enemyIsTargetable(spawnedEnemy)) { continue; } if (doGroundCast) { if (!Physics.Raycast(((Component)spawnedEnemy).transform.position, Vector3.down, ref thisEnemy.raycastHit, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) || (requirePath && thisEnemy.PathIsIntersectedByLineOfSight(((RaycastHit)(ref thisEnemy.raycastHit)).point, false, false, false))) { continue; } } else if (requirePath && thisEnemy.PathIsIntersectedByLineOfSight(((Component)spawnedEnemy).transform.position, false, false, false)) { continue; } if (!requireLineOfSight || thisEnemy.CheckLineOfSightForPosition(((Component)spawnedEnemy.eye).transform.position, viewWidth, 40, -1f, (Transform)null)) { thisEnemy.tempDist = Vector3.Distance(((Component)thisEnemy).transform.position, ((Component)spawnedEnemy).transform.position); if (thisEnemy.tempDist < thisEnemy.mostOptimalDistance) { thisEnemy.mostOptimalDistance = thisEnemy.tempDist; targetEnemy = spawnedEnemy; } } } if ((Object)(object)targetEnemy != (Object)null && bufferDistance > 0f && (Object)(object)val != (Object)null && Mathf.Abs(thisEnemy.mostOptimalDistance - Vector3.Distance(((Component)thisEnemy).transform.position, ((Component)val).transform.position)) < bufferDistance) { targetEnemy = val; } return (Object)(object)targetEnemy != (Object)null; } public static EnemyAI? CheckLineOfSightForClosestEnemy(this EnemyAI thisEnemy, out EnemyAI? targetEnemy, EnemyAI? previousTargetEnemy, float width = 45f, int range = 60, int proximityAwareness = -1, float bufferDistance = 0f) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0095: 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_00a5: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) targetEnemy = previousTargetEnemy; if (thisEnemy.isOutside && !thisEnemy.enemyType.canSeeThroughFog && (int)TimeOfDay.Instance.currentLevelWeather == 3) { range = Mathf.Clamp(range, 0, 30); } float num = 1000f; float num2 = 1000f; EnemyAI val = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { num = 1000f; Vector3 position = ((Component)spawnedEnemy.eye).transform.position; Vector3 val2 = position - thisEnemy.eye.position; bool flag = false; if (Vector3.Angle(thisEnemy.eye.forward, val2) < width) { flag = true; } else { num = Vector3.Distance(thisEnemy.eye.position, position); if (proximityAwareness != -1 && num < (float)proximityAwareness) { flag = true; } } if (flag && !Physics.Linecast(thisEnemy.eye.position, position, ref thisEnemy.raycastHit, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && !Physics.Linecast(position, thisEnemy.eye.position, ref thisEnemy.raycastHit, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { if (num == 1000f) { num = Vector3.Distance(thisEnemy.eye.position, position); } if (num < num2) { num2 = num; val = spawnedEnemy; } } } if ((Object)(object)targetEnemy != (Object)null && (Object)(object)val != (Object)null && (Object)(object)targetEnemy != (Object)(object)val && bufferDistance > 0f && Mathf.Abs(num2 - Vector3.Distance(((Component)thisEnemy).transform.position, ((Component)targetEnemy).transform.position)) < bufferDistance) { return null; } if ((Object)(object)val == (Object)null) { return null; } thisEnemy.mostOptimalDistance = num2; return val; } } public static class GameObjectExtensions { public static StatusEffectController StatusEffectController(this GameObject gameObject) { StatusEffectController statusEffectController = default(StatusEffectController); return gameObject.TryGetComponent<StatusEffectController>(ref statusEffectController) ? statusEffectController : gameObject.AddComponent<StatusEffectController>(); } public static bool TryGetComponentInChildren<T>(this GameObject go, out T? component) where T : Component { component = go.GetComponentInChildren<T>(); return (Object)(object)component != (Object)null; } } public static class IEnumerableExtensions { public static T? GetRandom<T>(this IEnumerable<T> source, Random random) where T : class { if (source is IList<T> list) { if (list.Count == 0) { return null; } return list[random.Next(list.Count)]; } T[] array = (source as T[]) ?? source.ToArray(); if (array.Length == 0) { return null; } return array[random.Next(array.Length)]; } public static T? GetRandom<T>(this IEnumerable<T> source) where T : class { if (source is IList<T> list) { if (list.Count == 0) { return null; } return list[Random.Range(0, list.Count)]; } T[] array = (source as T[]) ?? source.ToArray(); if (array.Length == 0) { return null; } return array[Random.Range(0, array.Length)]; } public static T? GetClosestToPosition<T>(this IEnumerable<T> list, Vector3 position, Func<T, Vector3> positionSelector, out float closestDistance, bool fastDistanceCheck = false, IEnumerable<T>? excluded = null) where T : class { //IL_0048: 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) T result = null; closestDistance = float.PositiveInfinity; if (excluded == null) { excluded = Array.Empty<T>(); } foreach (T item in list) { if (item != null && !excluded.Contains(item)) { float num = Utils.SmartDistance(position, positionSelector(item), fastDistanceCheck); if (!(num >= closestDistance)) { result = item; closestDistance = num; } } } return result; } public static T? GetClosestToPosition<T>(this IEnumerable<T> list, Vector3 position, Func<T, Vector3> positionSelector, bool fastDistanceCheck = false, IEnumerable<T>? excluded = null) where T : class { //IL_0047: 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) T result = null; float num = float.PositiveInfinity; if (excluded == null) { excluded = Array.Empty<T>(); } foreach (T item in list) { if (item != null && !excluded.Contains(item)) { float num2 = Utils.SmartDistance(position, positionSelector(item), fastDistanceCheck); if (!(num2 >= num)) { result = item; num = num2; } } } return result; } public static T? GetFarthestFromPosition<T>(this IEnumerable<T> list, Vector3 position, Func<T, Vector3> positionSelector, out float farthestDistance, bool fastDistanceCheck = false, IEnumerable<T>? excluded = null) where T : class { //IL_0048: 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) T result = null; farthestDistance = 0f; if (excluded == null) { excluded = Array.Empty<T>(); } foreach (T item in list) { if (item != null && !excluded.Contains(item)) { float num = Utils.SmartDistance(position, positionSelector(item), fastDistanceCheck); if (!(num <= farthestDistance)) { result = item; farthestDistance = num; } } } return result; } public static T? GetFarthestFromPosition<T>(this IEnumerable<T> list, Vector3 position, Func<T, Vector3> positionSelector, bool fastDistanceCheck = false, IEnumerable<T>? excluded = null) where T : class { //IL_0047: 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) T result = null; float num = 0f; if (excluded == null) { excluded = Array.Empty<T>(); } foreach (T item in list) { if (item != null && !excluded.Contains(item)) { float num2 = Utils.SmartDistance(position, positionSelector(item), fastDistanceCheck); if (!(num2 <= num)) { result = item; num = num2; } } } return result; } public static IEnumerable<T> GetInRange<T>(this IEnumerable<T> list, Vector3 position, Func<T, Vector3> positionSelector, float range, IEnumerable<T>? excluded = null) where T : class { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) List<T> list2 = new List<T>(); if (excluded == null) { excluded = Array.Empty<T>(); } foreach (T item in list) { if (item != null && !excluded.Contains(item) && Vector3.Distance(position, positionSelector(item)) < range) { list2.Add(item); } } return list2; } } public static class PlayerControllerBExtensions { public static StatusEffectController StatusEffectController(this PlayerControllerB player) { StatusEffectController statusEffectController = default(StatusEffectController); return ((Component)player).gameObject.TryGetComponent<StatusEffectController>(ref statusEffectController) ? statusEffectController : ((Component)player).gameObject.AddComponent<StatusEffectController>(); } public static bool GrabGrabbableObject(this PlayerControllerB player, GrabbableObject grabbableObject) { //IL_0235: Unknown result type (might be due to invalid IL or missing references) if (player.twoHanded || player.sinkingValue > 0.73f) { return false; } player.currentlyGrabbingObject = grabbableObject; if (!GameNetworkManager.Instance.gameHasStarted && !player.currentlyGrabbingObject.itemProperties.canBeGrabbedBeforeGameStart && (Object)(object)StartOfRound.Instance.testRoom == (Object)null) { return false; } player.grabInvalidated = false; if ((Object)(object)player.currentlyGrabbingObject == (Object)null || player.inSpecialInteractAnimation || player.currentlyGrabbingObject.isHeld || player.currentlyGrabbingObject.isPocketed) { return false; } NetworkObject networkObject = ((NetworkBehaviour)player.currentlyGrabbingObject).NetworkObject; if ((Object)(object)networkObject == (Object)null || !networkObject.IsSpawned) { return false; } player.currentlyGrabbingObject.InteractItem(); if (!player.currentlyGrabbingObject.grabbable || player.FirstEmptyItemSlot(player.currentlyGrabbingObject) == -1) { return false; } player.playerBodyAnimator.SetBool("GrabInvalidated", false); player.playerBodyAnimator.SetBool("GrabValidated", false); player.playerBodyAnimator.SetBool("cancelHolding", false); player.playerBodyAnimator.ResetTrigger("Throw"); player.SetSpecialGrabAnimationBool(true, (GrabbableObject)null); player.isGrabbingObjectAnimation = true; ((Behaviour)player.cursorIcon).enabled = false; ((TMP_Text)player.cursorTip).text = ""; player.twoHanded = player.currentlyGrabbingObject.itemProperties.twoHanded; player.carryWeight = Mathf.Clamp(player.carryWeight + (player.currentlyGrabbingObject.itemProperties.weight - 1f), 1f, 10f); StartOfRound.Instance.SendChangedWeightEvent(); if (player.currentlyGrabbingObject.itemProperties.grabAnimationTime > 0f) { player.grabObjectAnimationTime = player.currentlyGrabbingObject.itemProperties.grabAnimationTime; } else { player.grabObjectAnimationTime = 0.4f; } if (!player.isTestingPlayer) { player.GrabObjectServerRpc(NetworkObjectReference.op_Implicit(networkObject)); } if (player.grabObjectCoroutine != null) { ((MonoBehaviour)player).StopCoroutine(player.grabObjectCoroutine); } player.grabObjectCoroutine = ((MonoBehaviour)player).StartCoroutine(player.GrabObject()); return true; } public static void FreezePlayer(this PlayerControllerB player, bool value) { Utils.localPlayerFrozen = value; player.disableInteract = value; player.disableLookInput = value; player.disableMoveInput = value; } public static void MakePlayerInvisible(this PlayerControllerB player, bool value) { GameObject gameObject = ((Component)((Component)player).gameObject.transform.Find("ScavengerModel")).gameObject; if ((Object)(object)gameObject == (Object)null) { Plugin.logger.LogError((object)"ScavengerModel not found"); return; } ((Component)gameObject.transform.Find("LOD1")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("LOD2")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("LOD3")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("metarig/spine/spine.001/spine.002/spine.003/LevelSticker")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("metarig/spine/spine.001/spine.002/spine.003/BetaBadge")).gameObject.SetActive(!value); ((Component)player.playerBadgeMesh).gameObject.SetActive(!value); } public static void RebuildRig(this PlayerControllerB player) { if ((Object)(object)player != (Object)null && (Object)(object)player.playerBodyAnimator != (Object)null) { player.playerBodyAnimator.WriteDefaultValues(); RigBuilder component = ((Component)player.playerBodyAnimator).GetComponent<RigBuilder>(); if (component != null) { component.Build(); } } } public static void MufflePlayer(this PlayerControllerB player, bool muffle) { if ((Object)(object)player.currentVoiceChatAudioSource == (Object)null) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if ((Object)(object)player.currentVoiceChatAudioSource != (Object)null) { ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioLowPassFilter>().lowpassResonanceQ = (muffle ? 5f : 1f); OccludeAudio component = ((Component)player.currentVoiceChatAudioSource).GetComponent<OccludeAudio>(); component.overridingLowPass = muffle; component.lowPassOverride = (muffle ? 500f : 20000f); player.voiceMuffledByEnemy = muffle; } } public static bool IsPlayerSpeaking(this PlayerControllerB player, float amplitudeThreshold = 0.005f, bool useRelativeAmplitude = true) { VoicePlayerState voicePlayerState = player.GetVoicePlayerState(); if (voicePlayerState == null) { return false; } return voicePlayerState.IsSpeaking && player.GetPlayerVoiceAmplitude(useRelativeAmplitude) > amplitudeThreshold; } public static bool IsPlayerMuted(this PlayerControllerB player) { VoicePlayerState voicePlayerState = player.GetVoicePlayerState(); return voicePlayerState == null || !voicePlayerState.IsConnected; } public static float GetPlayerVoiceAmplitude(this PlayerControllerB player, bool getRelativeAmplitude = false) { VoicePlayerState voicePlayerState = player.GetVoicePlayerState(); if (voicePlayerState == null || !voicePlayerState.IsConnected) { return 0f; } return getRelativeAmplitude ? (voicePlayerState.Amplitude / Mathf.Clamp(StartOfRound.Instance.averageVoiceAmplitude, 0.008f, 0.5f)) : voicePlayerState.Amplitude; } public static VoicePlayerState? GetVoicePlayerState(this PlayerControllerB player) { VoicePlayerState val = player.voicePlayerState; if (PlayerControllerBExtensions.IsLocalPlayer(player) && !string.IsNullOrEmpty(StartOfRound.Instance.voiceChatModule.LocalPlayerName)) { val = StartOfRound.Instance.voiceChatModule.FindPlayer(StartOfRound.Instance.voiceChatModule.LocalPlayerName); } if (val == null) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if (val == null) { val = player.voicePlayerState; } return val; } public static void DiscardItemInSlot(this PlayerControllerB player, int slot, bool placeObject = false, NetworkObject? parentObjectTo = null, Vector3 placePosition = default(Vector3), bool matchRotationOfParent = true, bool setInShip = false, bool setInElevator = false, Vector3 syncedPlayerPosition = default(Vector3), Vector3 syncedHeldObjectPosition = default(Vector3), Vector3 syncedHeldObjectRotation = default(Vector3), Vector3 syncedPlayerCamPosition = default(Vector3), Vector3 syncedPlayerCamRotation = default(Vector3)) { //IL_0012: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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) if (player.currentItemSlot == slot) { player.DiscardHeldObject(placeObject, parentObjectTo, placePosition, matchRotationOfParent); return; } GrabbableObject val = player.ItemSlots[slot]; if (!((Object)(object)val == (Object)null)) { player.DropHeldItem(val, true, false, syncedPlayerPosition, syncedHeldObjectPosition, syncedHeldObjectRotation, syncedPlayerCamPosition, syncedPlayerCamRotation, setInShip, setInElevator); if (((NetworkBehaviour)player).IsOwner) { ((Behaviour)HUDManager.Instance.itemSlotIcons[slot]).enabled = false; } } } public static bool IsPlayerWithinShipBounds(this PlayerControllerB player) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0097: Unknown result type (might be due to invalid IL or missing references) int sceneCount = SceneManager.sceneCount; Scene[] array = (Scene[])(object)new Scene[sceneCount]; int num = 0; for (int i = 0; i < sceneCount; i++) { array[i] = SceneManager.GetSceneAt(i); if (((Scene)(ref array[i])).name == "CompanyBuilding") { num++; } } if (num == 1) { return true; } if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { return false; } Bounds bounds = StartOfRound.Instance.shipBounds.bounds; return ((Bounds)(ref bounds)).Contains(((Component)player).transform.position); } } public static class SmartAgentNavigatorExtensions { public static bool SmartCanPathToPoint(this SmartAgentNavigator nav, Vector3 pos) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) return Utils.SmartCanPathToPoint(((Component)nav.agent).transform.position, pos, nav.IsAgentOutside()); } public static bool SmartCanPathToPoint(this SmartAgentNavigator nav, Vector3 startPos, Vector3 endPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) return Utils.SmartCanPathToPoint(startPos, endPos, nav.IsAgentOutside()); } public static bool CanPathToPoint(this SmartAgentNavigator nav, Vector3 pos) { //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) return nav.CanPathToPoint(((Component)nav.agent).transform.position, pos) > 0f; } } public static class Vector3Extensions { public static Vector3 GetFloorPosition(this Vector3 position, float verticalOffset = 0f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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_0052: 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_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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (Physics.Raycast(position, -Vector3.up, ref val, 80f, 268437761, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val)).point + Vector3.up * 0.04f + verticalOffset * Vector3.up; } return position; } public static T? GetClosestGameObjectOfType<T>(this Vector3 position) where T : Component { //IL_0028: 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) T[] array = Object.FindObjectsOfType<T>(); T result = default(T); float num = float.PositiveInfinity; T[] array2 = array; foreach (T val in array2) { float num2 = Vector3.Distance(position, ((Component)val).transform.position); if (num2 < num) { num = num2; result = val; } } return result; } public static PlayerControllerB[] GetNearbyPlayers(this Vector3 position, float distance = 10f, List<PlayerControllerB>? ignoredPlayers = null) { //IL_0050: 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) List<PlayerControllerB> list = new List<PlayerControllerB>(); PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && (ignoredPlayers == null || !ignoredPlayers.Contains(val)) && !(Vector3.Distance(position, ((Component)val).transform.position) > distance)) { list.Add(val); } } return list.ToArray(); } public static bool IsOutside(this Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return position.y > -80f; } } public interface ISingletonItem { } [HarmonyPatch] internal static class ISingletonItemPatch { private static HashSet<Type> spawned = new HashSet<Type>(); private static GrabbableObject? despawningDuplicate; [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "Start")] private static void GrabbableObject_Start_Postfix(GrabbableObject __instance) { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) try { if (!((NetworkBehaviour)__instance).IsServer || !(__instance is ISingletonItem)) { return; } Type type = ((object)__instance).GetType(); if (spawned.Contains(type)) { List<SpawnableItemWithRarity> list = RoundManager.Instance.currentLevel.spawnableScrap.Where((SpawnableItemWithRarity x) => (Object)(object)x.spawnableItem != (Object)(object)__instance.itemProperties).ToList(); List<int> list2 = list.Select((SpawnableItemWithRarity x) => x.rarity).ToList(); int randomWeightedIndexList = RoundManager.Instance.GetRandomWeightedIndexList(list2, (Random)null); Item spawnableItem = list[randomWeightedIndexList].spawnableItem; int num = (int)((float)Random.Range(spawnableItem.minValue, spawnableItem.maxValue) * RoundManager.Instance.scrapValueMultiplier); Plugin.logger.LogDebug((object)$"Only one {((Object)__instance.itemProperties).name} instance can be spawned, replacing duplicate with {((Object)spawnableItem).name} with a scrap value of {num}"); Vector3 position = ((Component)__instance).transform.position + Vector3.up * 0.25f; GrabbableObject grabbableObject = Utils.SpawnItem(((DawnBaseInfo<DawnItemInfo>)(object)ItemExtensions.GetDawnInfo(spawnableItem)).TypedKey, position); ((MonoBehaviour)NetworkHandler.Instance).StartCoroutine(NetworkHandler.Instance.SetScrapSpawnOnNetworkSpawn(grabbableObject, num)); despawningDuplicate = __instance; ((NetworkBehaviour)__instance).NetworkObject.Despawn(true); } else { spawned.Add(type); } } catch (Exception ex) { Plugin.logger.LogError((object)ex); } } [HarmonyPrefix] [HarmonyPatch(typeof(GrabbableObject), "OnDestroy")] private static void GrabbableObject_OnDestroy_Prefix(GrabbableObject __instance) { try { if (((NetworkBehaviour)__instance).IsServer && __instance is ISingletonItem) { if ((Object)(object)despawningDuplicate != (Object)null && (Object)(object)despawningDuplicate == (Object)(object)__instance) { despawningDuplicate = null; } else { spawned.Remove(((object)__instance).GetType()); } } } catch { } } } public class NetworkHandler : NetworkBehaviour { public static NetworkHandler Instance { get; private set; } public override void OnNetworkSpawn() { if (((NetworkBehaviour)this).IsServer && (Object)(object)Instance != (Object)null && (Object)(object)Instance != (Object)(object)this) { ((Component)Instance).GetComponent<NetworkObject>().Despawn(true); } ((Object)this).hideFlags = (HideFlags)61; Instance = this; Plugin.logger.LogDebug((object)"NetworkHandler spawned"); ((NetworkBehaviour)this).OnNetworkSpawn(); } public override void OnNetworkDespawn() { ((NetworkBehaviour)this).OnNetworkDespawn(); if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } } public void Start() { InitConfigManager.Initialize(); StaticUpdateManager.Initialize(); } public void Update() { StaticUpdateManager.Update(); } [Rpc(/*Could not decode attribute arguments.*/)] public void ShakeCameraRpc(ScreenShakeType screenShakeType, RpcParams rpcParams) { //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_0043: 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_0051: 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_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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1805725168u, rpcParams, val, (SendTo)8, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<ScreenShakeType>(ref screenShakeType, default(ForEnums)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1805725168u, rpcParams, val, (SendTo)8, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; HUDManager.Instance.ShakeCamera(screenShakeType); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ChangePlayerSizeRpc(ulong clientId, float size) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(944480672u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref size, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 944480672u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if (!((Object)(object)val4 == (Object)null)) { val4.thisPlayerBody.localScale = new Vector3(size, size, size); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void MufflePlayerRpc(ulong clientId, bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3841467943u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3841467943u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if (!((Object)(object)val4 == (Object)null)) { val4.MufflePlayer(value); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillPlayerRpc(ulong clientId) { //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_0043: 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_0051: 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_0068: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(544173340u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 544173340u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Plugin.localPlayer.actualClientId == clientId) { Plugin.localPlayer.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0, default(Vector3), false); } } } internal IEnumerator SetScrapSpawnOnNetworkSpawn(GrabbableObject grabbableObject, int value) { yield return null; yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)((NetworkBehaviour)grabbableObject).NetworkObject != (Object)null && ((NetworkBehaviour)grabbableObject).NetworkObject.IsSpawned)); Instance.SetScrapValueRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)grabbableObject).NetworkObject), value); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetScrapValueRpc(NetworkObjectReference netRef, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_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_0083: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3930017063u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3930017063u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); GrabbableObject val5 = default(GrabbableObject); if (((NetworkObjectReference)(ref netRef)).TryGet(ref val4, (NetworkManager)null) && ((Component)val4).TryGetComponent<GrabbableObject>(ref val5)) { Plugin.logger.LogDebug((object)$"Setting scrap value of {((Object)val5).name} to {value}"); val5.SetScrapValue(value); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnEnemyRpc(NamespacedKey<DawnEnemyInfo> key, Vector3 position, Quaternion rotation = default(Quaternion), bool destroyWithScene = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_007f: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1349571230u, val3, val, (SendTo)2, (RpcDelivery)0); bool flag = key != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<NamespacedKey<DawnEnemyInfo>>(ref key, default(ForNetworkSerializable)); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref destroyWithScene, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1349571230u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { GameObject val4 = Object.Instantiate<GameObject>(((Registry<DawnEnemyInfo>)(object)LethalContent.Enemies)[key].EnemyType.enemyPrefab, position, rotation); EnemyAI component = val4.GetComponent<EnemyAI>(); ((NetworkBehaviour)component).NetworkObject.Spawn(destroyWithScene); RoundManager.Instance.SpawnedEnemies.Add(component); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnItemRpc(NamespacedKey<DawnItemInfo> key, Vector3 position, Quaternion rotation = default(Quaternion), float fallTime = 0f, bool destroyWithScene = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_007f: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_00a9: 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_016c: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1523590376u, val3, val, (SendTo)2, (RpcDelivery)0); bool flag = key != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<NamespacedKey<DawnItemInfo>>(ref key, default(ForNetworkSerializable)); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref fallTime, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref destroyWithScene, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1523590376u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { GameObject val4 = Object.Instantiate<GameObject>(((Registry<DawnItemInfo>)(object)LethalContent.Items)[key].Item.spawnPrefab, position, rotation); GrabbableObject component = val4.GetComponent<GrabbableObject>(); component.fallTime = fallTime; ((NetworkBehaviour)component).NetworkObject.Spawn(destroyWithScene); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnMapObjectRpc(NamespacedKey<DawnMapObjectInfo> key, Vector3 position, Quaternion rotation = default(Quaternion), bool destroyWithScene = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_007f: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4047400807u, val3, val, (SendTo)2, (RpcDelivery)0); bool flag = key != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<NamespacedKey<DawnMapObjectInfo>>(ref key, default(ForNetworkSerializable)); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref destroyWithScene, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4047400807u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { GameObject val4 = Object.Instantiate<GameObject>(((Registry<DawnMapObjectInfo>)(object)LethalContent.MapObjects)[key].GetMapObjectPrefab(), position, rotation); SpawnableMapObject component = val4.GetComponent<SpawnableMapObject>(); val4.GetComponent<NetworkObject>().Spawn(destroyWithScene); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnExplosionRpc(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, bool goThroughCar = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_0146: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4254446207u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref spawnExplosionEffect, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref killRange, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref damageRange, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, nonLethalDamage); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref physicsForce, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref goThroughCar, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4254446207u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; Landmine.SpawnExplosion(explosionPosition, spawnExplosionEffect, killRange, damageRange, nonLethalDamage, physicsForce, (GameObject)null, goThroughCar); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetEarsRingingRpc(float time, RpcParams rpcParams) { //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_0043: 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_0051: 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_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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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) { RpcAttributeParams val = default(RpcAttributeParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1872345569u, rpcParams, val, (SendTo)8, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref time, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1872345569u, rpcParams, val, (SendTo)8, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; SoundManager.Instance.earsRingingTimer = time; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DisplayStatusEffectRpc(string statusEffectString, RpcParams rpcParams) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_007f: 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_00e3: 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_00b5: 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) { RpcAttributeParams val = default(RpcAttributeParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2432440999u, rpcParams, val, (SendTo)8, (RpcDelivery)0); bool flag = statusEffectString != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(statusEffectString, false); } ((NetworkBehaviour)this).__endSendRpc(ref val2, 2432440999u, rpcParams, val, (SendTo)8, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; Utils.DisplayStatusEffect(statusEffectString); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetShipLeaveEarlyServerRpc(float timeToLeaveEarly, string message, string speakerText = "SAFETY COMPUTER", float waitTime = 4f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_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_009a: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3796664176u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref timeToLeaveEarly, default(ForPrimitives)); bool flag = message != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(message, false); } bool flag2 = speakerText != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(speakerText, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref waitTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3796664176u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; DialogueSegment val4 = new DialogueSegment(); val4.speakerText = speakerText; val4.bodyText = message; val4.waitTime = waitTime; TimeOfDay.Instance.shipLeaveAutomaticallyTime = timeToLeaveEarly; TimeOfDay.Instance.shipLeavingAlertCalled = true; HUDManager.Instance.ReadDialogue((DialogueSegment[])(object)new DialogueSegment[1] { val4 }); ((Behaviour)HUDManager.Instance.shipLeavingEarlyIcon).enabled = true; } } [Rpc(/*Could not decode attribute arguments.*/)] public void DisplayAdRpc() { //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_0043: 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_0051: 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_0073: 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_00a5: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1546914772u, val3, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1546914772u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; HUDManager.Instance.ChooseAdItem(); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void RevivePlayerRpc(ulong clientId, Vector3 position = default(Vector3)) { //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_0043: 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_0051: 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_0068: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(888768384u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendRpc(ref val2, 888768384u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if ((Object)(object)val4 == (Object)null) { return; } if (position == default(Vector3)) { position = StartOfRound.Instance.GetPlayerSpawnPosition(Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val4), false); } val4.isInsideFactory = false; val4.isInElevator = true; val4.isInHangarShipRoom = true; val4.ResetPlayerBloodObjects(val4.isPlayerDead); val4.health = 5; val4.isClimbingLadder = false; val4.clampLooking = false; val4.inVehicleAnimation = false; val4.disableMoveInput = false; val4.disableLookInput = false; val4.disableInteract = false; val4.ResetZAndXRotation(); ((Collider)val4.thisController).enabled = true; if (val4.isPlayerDead) { ((Collider)val4.thisController).enabled = true; val4.isPlayerDead = false; val4.isPlayerControlled = true; val4.health = 5; val4.hasBeenCriticallyInjured = false; val4.criticallyInjured = false; val4.playerBodyAnimator.SetBool("Limp", false); val4.TeleportPlayer(position, false, 0f, false, true); val4.parentedToElevatorLastFrame = false; val4.overrideGameOverSpectatePivot = null; StartOfRound.Instance.SetPlayerObjectExtrapolate(false); val4.setPositionOfDeadPlayer = false; val4.DisablePlayerModel(((Component)val4).gameObject, true, true); ((Behaviour)val4.helmetLight).enabled = false; val4.Crouch(false); Animator playerBodyAnimator = val4.playerBodyAnimator; if ((Object)(object)playerBodyAnimator != (Object)null) { playerBodyAnimator.SetBool("Limp", false); } val4.bleedingHeavily = false; if ((Object)(object)val4.deadBody != (Object)null) { ((Behaviour)val4.deadBody).enabled = false; ((Component)val4.deadBody).gameObject.SetActive(false); } val4.bleedingHeavily = true; val4.deadBody = null; val4.activatingItem = false; val4.twoHanded = false; val4.inShockingMinigame = false; val4.inSpecialInteractAnimation = false; val4.freeRotationInInteractAnimation = false; val4.disableSyncInAnimation = false; val4.inAnimationWithEnemy = null; val4.holdingWalkieTalkie = false; val4.speakingToWalkieTalkie = false; val4.isSinking = false; val4.isUnderwater = false; val4.sinkingValue = 0f; val4.statusEffectAudio.Stop(); val4.DisableJetpackControlsLocally(); val4.mapRadarDotAnimator.SetBool("dead", false); val4.hasBegunSpectating = false; val4.externalForceAutoFade = Vector3.zero; val4.hinderedMultiplier = 1f; val4.isMovementHindered = 0; val4.sourcesCausingSinking = 0; val4.reverbPreset = StartOfRound.Instance.shipReverb; SoundManager.Instance.earsRingingTimer = 0f; val4.voiceMuffledByEnemy = false; SoundManager.Instance.playerVoicePitchTargets[Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val4)] = 1f; SoundManager.Instance.SetPlayerPitch(1f, Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val4)); if ((Object)(object)val4.currentVoiceChatIngameSettings == (Object)null) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if ((Object)(object)val4.currentVoiceChatIngameSettings != (Object)null) { if ((Object)(object)val4.currentVoiceChatIngameSettings.voiceAudio == (Object)null) { val4.currentVoiceChatIngameSettings.InitializeComponents(); } if ((Object)(object)val4.currentVoiceChatIngameSettings.voiceAudio == (Object)null) { return; } ((Component)val4.currentVoiceChatIngameSettings.voiceAudio).GetComponent<OccludeAudio>().overridingLowPass = false; } HUDManager.Instance.UpdateBoxesSpectateUI(); HUDManager.Instance.UpdateSpectateBoxSpeakerIcons(); } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)val4) { val4.bleedingHeavily = false; val4.criticallyInjured = false; val4.health = 5; HUDManager.Instance.UpdateHealthUI(5, true); Animator playerBodyAnimator2 = val4.playerBodyAnimator; if ((Object)(object)playerBodyAnimator2 != (Object)null) { playerBodyAnimator2.SetBool("Limp", false); } val4.spectatedPlayerScript = null; StartOfRound.Instance.SetSpectateCameraToGameOverMode(false, val4); StartOfRound.Instance.SetPlayerObjectExtrapolate(false); ((Behaviour)HUDManager.Instance.audioListenerLowPass).enabled = false; HUDManager.Instance.gasHelmetAnimator.SetBool("gasEmitting", false); HUDManager.Instance.RemoveSpectateUI(); HUDManager.Instance.gameOverAnimator.SetTrigger("revive"); } StartOfRound.Instance.allPlayersDead = false; StartOfRound instance = StartOfRound.Instance; instance.livingPlayers++; StartOfRound.Instance.UpdatePlayerVoiceEffects(); } [Rpc(/*Could not decode attribute arguments.*/)] public void DropHeldItemRpc(ulong clientId, int dropItemSlot, bool itemsFall, bool disconnecting, Vector3 syncedPlayerPosition = default(Vector3), Vector3 syncedHeldObjectPosition = default(Vector3), Vector3 syncedHeldObjectRotation = default(Vector3), Vector3 syncedPlayerCamPosition = default(Vector3), Vector3 syncedPlayerCamRotation = default(Vector3), bool setInShip = false, bool setInElevator = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0068: 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_008e: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4022529626u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); BytePacker.WriteValueBitPacked(val2, dropItemSlot); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref itemsFall, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref disconnecting, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInShip, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInElevator, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4022529626u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if (!((Object)(object)val4 == (Object)null)) { GrabbableObject val5 = val4.ItemSlots[dropItemSlot]; if (!((Object)(object)val5 == (Object)null)) { val4.DropHeldItem(val5, itemsFall, disconnecting, syncedPlayerPosition, syncedHeldObjectPosition, syncedHeldObjectRotation, syncedPlayerCamPosition, syncedPlayerCamRotation, setInShip, setInElevator); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DiscardItemInSlotRpc(ulong clientId, int slot, NetworkObjectReference parentObjectTo, bool placeObject = false, Vector3 placePosition = default(Vector3), bool matchRotationOfParent = true, bool setInShip = false, bool setInElevator = false, Vector3 syncedPlayerPosition = default(Vector3), Vector3 syncedHeldObjectPosition = default(Vector3), Vector3 syncedHeldObjectRotation = default(Vector3), Vector3 syncedPlayerCamPosition = default(Vector3), Vector3 syncedPlayerCamRotation = default(Vector3)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0068: 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_008e: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(400129170u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); BytePacker.WriteValueBitPacked(val2, slot); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref parentObjectTo, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref placeObject, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref placePosition); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref matchRotationOfParent, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInShip, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInElevator, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamRotation); ((NetworkBehaviour)this).__endSendRpc(ref val2, 400129170u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if (!((Object)(object)val4 == (Object)null)) { val4.DiscardItemInSlot(slot, placeObject, NetworkObjectReference.op_Implicit(parentObjectTo), placePosition, matchRotationOfParent, setInShip, setInElevator, syncedPlayerPosition, syncedHeldObjectPosition, syncedHeldObjectRotation, syncedPlayerCamPosition, syncedPlayerCamRotation); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DiscardItemInSlotRpc(ulong clientId, int slot, bool placeObject = false, Vector3 placePosition = default(Vector3), bool matchRotationOfParent = true, bool setInShip = false, bool setInElevator = false, Vector3 syncedPlayerPosition = default(Vector3), Vector3 syncedHeldObjectPosition = default(Vector3), Vector3 syncedHeldObjectRotation = default(Vector3), Vector3 syncedPlayerCamPosition = default(Vector3), Vector3 syncedPlayerCamRotation = default(Vector3)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: 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_0068: 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_008e: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4241653702u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); BytePacker.WriteValueBitPacked(val2, slot); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref placeObject, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref placePosition); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref matchRotationOfParent, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInShip, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setInElevator, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedHeldObjectRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedPlayerCamRotation); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4241653702u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = Plugin.PlayerFromId(clientId); if (!((Object)(object)val4 == (Object)null)) { val4.DiscardItemInSlot(slot, placeObject, null, placePosition, matchRotationOfParent, setInShip, setInElevator, syncedPlayerPosition, syncedHeldObjectPosition, syncedHeldObjectRotation, syncedPlayerCamPosition, syncedPlayerCamRotation); } } } 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 reference