Decompiled source of TestAccountVariety v1.27.0
BepInEx/plugins/TestAccount666-TestAccountVariety/TestAccountVariety.dll
Decompiled 11 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DoorBreach; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using TestAccount666.TestAccountVariety.NetcodePatcher; using TestAccountCore; using TestAccountCore.Dependencies; using TestAccountCore.Dependencies.Compatibility; using TestAccountVariety.Dependencies; using TestAccountVariety.Items.ExtendedItems; using TestAccountVariety.Items.ShibaPlush.Functions; using TestAccountVariety.Items.ThrowableCube.Patches; using TestAccountVariety.Patches; using Unity.Mathematics; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [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.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("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("TestAccount666.TestAccountVariety")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Random stuff from TestAccount")] [assembly: AssemblyFileVersion("1.27.0.0")] [assembly: AssemblyInformationalVersion("1.27.0+0bc91b6af2a60d858cd4390ba438e25f1b310d55")] [assembly: AssemblyProduct("TestAccountVariety")] [assembly: AssemblyTitle("TestAccount666.TestAccountVariety")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.27.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.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] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace TestAccountVariety { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency("TestAccount666.TestAccountCore", "1.9.0")] [BepInPlugin("TestAccount666.TestAccountVariety", "TestAccountVariety", "1.27.0")] public class TestAccountVariety : BaseUnityPlugin { public static TestAccountVariety Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("TestAccount666.TestAccountVariety"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(typeof(ThrowableCubePatch)); Harmony.PatchAll(typeof(ShovelPatch)); Logger.LogDebug((object)"Finished patching!"); } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; if (DependencyChecker.IsLobbyCompatibilityInstalled()) { Logger.LogInfo((object)"Found LobbyCompatibility Mod, initializing support :)"); LobbyCompatibilitySupport.Initialize("TestAccount666.TestAccountVariety", "1.27.0", (CompatibilityLevel)2, (VersionStrictness)2); } Assembly executingAssembly = Assembly.GetExecutingAssembly(); Netcode.ExecuteNetcodePatcher(executingAssembly); AssetLoader.LoadBundle(executingAssembly, "TestAccountVariety"); AssetLoader.LoadItems(((BaseUnityPlugin)this).Config); AssetLoader.LoadHazards(((BaseUnityPlugin)this).Config); AssetLoader.LoadUnlockables(((BaseUnityPlugin)this).Config); AssetLoader.LoadCustomScripts(((BaseUnityPlugin)this).Config); VarietyConfig.Initialize(((BaseUnityPlugin)this).Config); Patch(); Logger.LogInfo((object)"TestAccount666.TestAccountVariety v1.27.0 has loaded!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } } internal static class VarietyConfig { public static ConfigEntry<int> cubeExplodeChance; public static ConfigEntry<int> yippeeParticleChance; public static ConfigEntry<bool> giftMimicSpawnsOutsideEnemies; public static ConfigEntry<int> giftMimicAlternativeVariantChance; public static ConfigEntry<string> giftMimicEnemyBlacklist; public static ConfigEntry<bool> fixTwoHandedWeapons; public static void Initialize(ConfigFile configFile) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown cubeExplodeChance = configFile.Bind<int>("Cube", "6. Cube Explode Chance", 50, "Chance for the cube to explode."); yippeeParticleChance = configFile.Bind<int>("Yippee", "6. Yippee Particle Chance", 60, "Chance for the yippee scrap to throw confetti."); giftMimicSpawnsOutsideEnemies = configFile.Bind<bool>("Gift Mimic", "3. Spawns Outside Enemies", false, "If set to true, will also spawn outside enemies. Starlancer AI Fix Required!!!."); giftMimicAlternativeVariantChance = configFile.Bind<int>("Gift Mimic", "4. Gift Mimic Alternative Variant Chance", 35, new ConfigDescription("Defines the chance for the Gift Mimic to use an alternative texture. Best when combined with UpturnedVariety.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); giftMimicEnemyBlacklist = configFile.Bind<string>("Gift Mimic", "5. Enemy Blacklist", "example1, example2", "A comma separated list of blacklisted enemies. Uses startsWith, so you don't need the full name."); fixTwoHandedWeapons = configFile.Bind<bool>("Bug Fixes", "Fix Two Handed Weapons", true, "If set to true, will fix the two Handed Weapons. If you swing a two Handed Weapon, you can switch to a different item. This option prevents this behavior."); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "TestAccount666.TestAccountVariety"; public const string PLUGIN_NAME = "TestAccountVariety"; public const string PLUGIN_VERSION = "1.27.0"; } } namespace TestAccountVariety.Patches { [HarmonyPatch(typeof(Shovel))] public static class ShovelPatch { [HarmonyPatch("HitShovel")] [HarmonyPostfix] public static void FixTwoHandedShovels(Shovel __instance, bool cancel) { if (!(!VarietyConfig.fixTwoHandedWeapons.Value || cancel)) { __instance.previousPlayerHeldBy.twoHanded = ((GrabbableObject)__instance).itemProperties.twoHanded; } } } } namespace TestAccountVariety.Items.Yippee { public class YippeeParticles : NetworkBehaviour { public ParticleSystem particleSystem; public GrabbableObject grabbableObject; private Random _random; public void Start() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) _random = new Random((uint)(DateTime.Now.Ticks & 0xFFFF)); } private void OnEnable() { if (((NetworkBehaviour)grabbableObject).IsOwner) { PlayParticlesServerRpc(); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)particleSystem)) { particleSystem.Stop(); } } [ServerRpc(RequireOwnership = false)] public void PlayParticlesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2334083020u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2334083020u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { int num = ((Random)(ref _random)).NextInt(1, 100); if (num < VarietyConfig.yippeeParticleChance.Value) { PlayParticlesClientRpc(); } } } [ClientRpc] public void PlayParticlesClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1965948094u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1965948094u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && Object.op_Implicit((Object)(object)particleSystem)) { particleSystem.time = 0f; particleSystem.Play(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_YippeeParticles() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2334083020u, new RpcReceiveHandler(__rpc_handler_2334083020)); NetworkManager.__rpc_func_table.Add(1965948094u, new RpcReceiveHandler(__rpc_handler_1965948094)); } private static void __rpc_handler_2334083020(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((YippeeParticles)(object)target).PlayParticlesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1965948094(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((YippeeParticles)(object)target).PlayParticlesClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "YippeeParticles"; } } } namespace TestAccountVariety.Items.WebleyPyramid { [CreateAssetMenu(menuName = "ScriptableObjects/AudioClipWithWeight", order = 1)] public class AudioClipWithWeight : ScriptableObject { public AudioClip audioClip; public int weight; public bool isDeadly; } public class WebleyPyramid : MonoBehaviour { private static readonly int _UntriggerAnimatorHash = Animator.StringToHash("Untrigger"); public GrabbableObject grabbableObject; public AudioSource audioSource; public List<AudioClipWithWeight> audioClips; public Animator animator; private void OnEnable() { if (audioSource.isPlaying) { animator.SetTrigger(_UntriggerAnimatorHash); return; } if (!grabbableObject.isHeld) { animator.SetTrigger(_UntriggerAnimatorHash); return; } PlayerControllerB playerHeldBy = grabbableObject.playerHeldBy; PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if ((Object)(object)playerHeldBy != (Object)(object)localPlayerController) { animator.SetTrigger(_UntriggerAnimatorHash); return; } int num = audioClips.Select((AudioClipWithWeight _, int weight) => weight).Sum(); Random val = default(Random); ((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF)); int num2 = ((Random)(ref val)).NextInt(num * 3, num * 12 + 1); AudioClipWithWeight audioClipWithWeight = null; bool flag; do { flag = false; foreach (AudioClipWithWeight audioClip in audioClips) { num2 -= audioClip.weight; if (num2 > 0) { continue; } audioClipWithWeight = audioClip; flag = true; break; } } while (!flag); grabbableObject.currentUseCooldown = audioClipWithWeight.audioClip.length; audioSource.PlayOneShot(audioClipWithWeight.audioClip); if (!audioClipWithWeight.isDeadly) { animator.SetTrigger(_UntriggerAnimatorHash); } else { ((MonoBehaviour)this).StartCoroutine(KillPlayerAfterClip()); } } public IEnumerator KillPlayerAfterClip() { yield return (object)new WaitUntil((Func<bool>)(() => !Object.op_Implicit((Object)(object)audioSource) || !audioSource.isPlaying)); PlayerControllerB localPlayer = StartOfRound.Instance.localPlayerController; if ((Object)(object)localPlayer == (Object)null || !Object.op_Implicit((Object)(object)localPlayer)) { if (Object.op_Implicit((Object)(object)animator)) { animator.SetTrigger(_UntriggerAnimatorHash); } yield break; } if (localPlayer.isPlayerDead) { if (Object.op_Implicit((Object)(object)animator)) { animator.SetTrigger(_UntriggerAnimatorHash); } yield break; } localPlayer.DamagePlayer(int.MaxValue, true, true, (CauseOfDeath)15, 1, false, default(Vector3)); if (Object.op_Implicit((Object)(object)animator)) { animator.SetTrigger(_UntriggerAnimatorHash); } } } } namespace TestAccountVariety.Items.ToyCar { public class ToyCar : HoldableNoisemakerProp { protected override void __initializeVariables() { base.__initializeVariables(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ToyCar"; } } } namespace TestAccountVariety.Items.ThrowableCube { public class ThrowableCube : StunGrenadeItem { private static InputAction? _interactInputAction; private static InputAction? _discardInputAction; private const float KILL_RANGE = 1f; private const float DAMAGE_RANGE = 3f; private Random _random; public override void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) ((StunGrenadeItem)this).Start(); _random = new Random((uint)(DateTime.Now.Ticks & 0xFFFF)); } public override void Update() { if (!((GrabbableObject)this).isHeld) { ((StunGrenadeItem)this).Update(); return; } PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController) { ((StunGrenadeItem)this).Update(); return; } if (_interactInputAction == null) { _interactInputAction = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false); } if (_discardInputAction == null) { _discardInputAction = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Discard", false); } base.explodeOnCollision = !_interactInputAction.IsPressed() && !_discardInputAction.IsPressed(); ((StunGrenadeItem)this).Update(); } [ServerRpc(RequireOwnership = false)] public void ExplodeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(437332633u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 437332633u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { int num = ((Random)(ref _random)).NextInt(1, 100); bool explode = num < VarietyConfig.cubeExplodeChance.Value; ExplodeClientRpc(explode); } } } [ClientRpc] public void ExplodeClientRpc(bool explode) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2048215277u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref explode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2048215277u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ExplodeStunGrenade(explode); } } } public void ExplodeStunGrenade(bool explode) { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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) base.gotExplodeOnThrowRPC = false; base.hasCollided = false; base.explodeTimer = 2.5f; base.hasExploded = false; if (explode) { Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up * 0.2f, false, 1f, 3f, 40, 45f, (GameObject)null, false); Transform val = ((!((GrabbableObject)this).isInElevator) ? RoundManager.Instance.mapPropsContainer.transform : StartOfRound.Instance.elevatorTransform); Object.Instantiate<GameObject>(base.stunGrenadeExplosion, ((Component)this).transform.position, Quaternion.identity, val); base.itemAudio.PlayOneShot(base.explodeSFX); WalkieTalkie.TransmitOneShotAudio(base.itemAudio, base.explodeSFX, 1f); } } protected override void __initializeVariables() { ((StunGrenadeItem)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_ThrowableCube() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(437332633u, new RpcReceiveHandler(__rpc_handler_437332633)); NetworkManager.__rpc_func_table.Add(2048215277u, new RpcReceiveHandler(__rpc_handler_2048215277)); } private static void __rpc_handler_437332633(NetworkBehaviour? target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableCube)(object)target).ExplodeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2048215277(NetworkBehaviour? target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool explode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref explode, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableCube)(object)target).ExplodeClientRpc(explode); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string? __getTypeName() { return "ThrowableCube"; } } } namespace TestAccountVariety.Items.ThrowableCube.Patches { [HarmonyPatch(typeof(StunGrenadeItem))] public static class ThrowableCubePatch { [HarmonyPatch("ExplodeStunGrenade")] [HarmonyPrefix] private static bool RedirectExplodeStunGrenade(StunGrenadeItem __instance) { if (!(__instance is ThrowableCube throwableCube)) { return true; } if (!((NetworkBehaviour)throwableCube).IsOwner) { return false; } if (!((GrabbableObject)throwableCube).grabbable) { return false; } throwableCube.ExplodeServerRpc(); return false; } } } namespace TestAccountVariety.Items.ShibaPlush { public class ShibaPlush : NoisemakerProp { private static readonly int _SqueezeAnimatorHash = Animator.StringToHash("Squeeze"); public ShibaPlushFunction[] shibaPlushFunctions; public override void ItemActivate(bool used, bool buttonDown = true) { if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if (!((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController)) { Random val = default(Random); ((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF)); RunActionServerRpc(((Random)(ref val)).NextInt(0, shibaPlushFunctions.Length)); } } } [ServerRpc(RequireOwnership = false)] public void RunActionServerRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1613242418u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1613242418u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RunActionClientRpc(index); } } } [ClientRpc] public void RunActionClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(160861681u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 160861681u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.triggerAnimator.SetTrigger(_SqueezeAnimatorHash); ShibaPlushFunction shibaPlushFunction = shibaPlushFunctions[index]; shibaPlushFunction.Run(); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_ShibaPlush() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1613242418u, new RpcReceiveHandler(__rpc_handler_1613242418)); NetworkManager.__rpc_func_table.Add(160861681u, new RpcReceiveHandler(__rpc_handler_160861681)); } private static void __rpc_handler_1613242418(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShibaPlush)(object)target).RunActionServerRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_160861681(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)2; ((ShibaPlush)(object)target).RunActionClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ShibaPlush"; } } } namespace TestAccountVariety.Items.ShibaPlush.Functions { public class BarrelFunction : SoundMakerPlushFunction { } public class MinecraftWoofFunction : SoundMakerPlushFunction { } public abstract class ShibaPlushFunction : MonoBehaviour { public ShibaPlush shibaPlush; public abstract void Run(); } public abstract class SoundMakerPlushFunction : ShibaPlushFunction { public AudioClip audioClip; public AudioClip farAudioClip; public override void Run() { //IL_011d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { float num = (float)((NoisemakerProp)shibaPlush).noisemakerRandom.Next((int)((double)((NoisemakerProp)shibaPlush).minLoudness * 100.0), (int)((double)((NoisemakerProp)shibaPlush).maxLoudness * 100.0)) / 100f; float pitch = (float)((NoisemakerProp)shibaPlush).noisemakerRandom.Next((int)((double)((NoisemakerProp)shibaPlush).minPitch * 100.0), (int)((double)((NoisemakerProp)shibaPlush).maxPitch * 100.0)) / 100f; ((NoisemakerProp)shibaPlush).noiseAudio.pitch = pitch; ((NoisemakerProp)shibaPlush).noiseAudio.PlayOneShot(audioClip, num); ((NoisemakerProp)shibaPlush).noiseAudioFar.pitch = pitch; ((NoisemakerProp)shibaPlush).noiseAudioFar.PlayOneShot(farAudioClip, num); WalkieTalkie.TransmitOneShotAudio(((NoisemakerProp)shibaPlush).noiseAudio, audioClip, num); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, ((NoisemakerProp)shibaPlush).noiseRange, num, 0, ((GrabbableObject)shibaPlush).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((double)((NoisemakerProp)shibaPlush).minLoudness < 0.6000000238418579) && (Object)(object)((GrabbableObject)shibaPlush).playerHeldBy != (Object)null) { ((GrabbableObject)shibaPlush).playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } } public class WesleyFunction : SoundMakerPlushFunction { } public class WuffWuffFunction : SoundMakerPlushFunction { } public class YippeeFunction : SoundMakerPlushFunction { public ParticleSystem particleSystem; public override void Run() { if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && Object.op_Implicit((Object)(object)particleSystem)) { base.Run(); particleSystem.time = 0f; particleSystem.Play(); } } } } namespace TestAccountVariety.Items.ExtendedItems { public class HoldableNoisemakerProp : NoisemakerProp { public float currentLoudness; public float nextAudibleNoise; public override void Update() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (base.noiseAudio.isPlaying) { nextAudibleNoise -= Time.deltaTime; if (nextAudibleNoise <= 0f) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, base.noiseRange, currentLoudness, 0, ((GrabbableObject)this).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); nextAudibleNoise = 0.5f; } ((GrabbableObject)this).currentUseCooldown = ((GrabbableObject)this).useCooldown; } } public override void PocketItem() { StopSoundServerRpc(); ((GrabbableObject)this).PocketItem(); } public override void DiscardItem() { StopSoundServerRpc(); ((GrabbableObject)this).DiscardItem(); } public override void ItemActivate(bool used, bool buttonDown = true) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && !((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController)) { if (!buttonDown) { StopSoundServerRpc(); return; } int index = base.noisemakerRandom.Next(0, base.noiseSFX.Length); float loudness = (float)base.noisemakerRandom.Next((int)((double)base.minLoudness * 100.0), (int)((double)base.maxLoudness * 100.0)) / 100f; float pitch = (float)base.noisemakerRandom.Next((int)((double)base.minPitch * 100.0), (int)((double)base.maxPitch * 100.0)) / 100f; StartSoundServerRpc(index, loudness, pitch); } } [ServerRpc(RequireOwnership = false)] public void StopSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3500384104u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3500384104u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { StopSoundClientRpc(); } } } [ClientRpc] public void StopSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(547195959u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 547195959u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.noiseAudio.Stop(); base.noiseAudioFar.Stop(); } } } [ServerRpc(RequireOwnership = false)] public void StartSoundServerRpc(int index, float loudness, float pitch) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3172316576u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref loudness, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref pitch, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3172316576u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { StartSoundClientRpc(index, loudness, pitch); } } } [ClientRpc] public void StartSoundClientRpc(int index, float loudness, float pitch) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(698722271u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref loudness, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref pitch, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 698722271u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.noiseAudio.Stop(); base.noiseAudioFar.Stop(); base.noiseAudio.loop = true; base.noiseAudio.clip = base.noiseSFX[index]; base.noiseAudio.volume = loudness; base.noiseAudio.pitch = pitch; base.noiseAudio.Play(); base.noiseAudioFar.loop = true; base.noiseAudioFar.clip = base.noiseSFXFar[index]; base.noiseAudioFar.volume = loudness; base.noiseAudioFar.pitch = pitch; base.noiseAudioFar.Play(); currentLoudness = loudness; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, base.noiseRange, currentLoudness, 0, ((GrabbableObject)this).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((double)base.minLoudness < 0.6000000238418579) && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { ((GrabbableObject)this).playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_HoldableNoisemakerProp() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3500384104u, new RpcReceiveHandler(__rpc_handler_3500384104)); NetworkManager.__rpc_func_table.Add(547195959u, new RpcReceiveHandler(__rpc_handler_547195959)); NetworkManager.__rpc_func_table.Add(3172316576u, new RpcReceiveHandler(__rpc_handler_3172316576)); NetworkManager.__rpc_func_table.Add(698722271u, new RpcReceiveHandler(__rpc_handler_698722271)); } private static void __rpc_handler_3500384104(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((HoldableNoisemakerProp)(object)target).StopSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_547195959(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((HoldableNoisemakerProp)(object)target).StopSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3172316576(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); float loudness = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref loudness, default(ForPrimitives)); float pitch = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref pitch, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoldableNoisemakerProp)(object)target).StartSoundServerRpc(index, loudness, pitch); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_698722271(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); float loudness = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref loudness, default(ForPrimitives)); float pitch = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref pitch, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((HoldableNoisemakerProp)(object)target).StartSoundClientRpc(index, loudness, pitch); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HoldableNoisemakerProp"; } } public class LitGrabbableObject : GrabbableObject { public List<Light> lights = new List<Light>(); public List<GameObject> displays = new List<GameObject>(); public override void PocketItem() { ((GrabbableObject)this).PocketItem(); SetLightsEnabledServerRpc(enabled: false); } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); SetLightsEnabledServerRpc(enabled: true); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); SetLightsEnabledServerRpc(enabled: true); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); SetLightsEnabledServerRpc(enabled: true); } [ServerRpc(RequireOwnership = false)] public void SetLightsEnabledServerRpc(bool enabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(974481117u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 974481117u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetLightsEnabledClientRpc(enabled); } } } [ClientRpc] public void SetLightsEnabledClientRpc(bool enabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4101551103u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4101551103u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { bool enabled2 = enabled; lights.ForEach(delegate(Light light) { ((Behaviour)light).enabled = enabled2; }); displays.ForEach(delegate(GameObject display) { display.SetActive(enabled2); }); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_LitGrabbableObject() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(974481117u, new RpcReceiveHandler(__rpc_handler_974481117)); NetworkManager.__rpc_func_table.Add(4101551103u, new RpcReceiveHandler(__rpc_handler_4101551103)); } private static void __rpc_handler_974481117(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lightsEnabledServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lightsEnabledServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LitGrabbableObject)(object)target).SetLightsEnabledServerRpc(lightsEnabledServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4101551103(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lightsEnabledClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lightsEnabledClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((LitGrabbableObject)(object)target).SetLightsEnabledClientRpc(lightsEnabledClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LitGrabbableObject"; } } public class LitNoisemakerProp : NoisemakerProp { public List<Light> lights = new List<Light>(); public List<GameObject> displays = new List<GameObject>(); public override void PocketItem() { ((GrabbableObject)this).PocketItem(); SetLightsEnabledServerRpc(enabled: false); } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); SetLightsEnabledServerRpc(enabled: true); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); SetLightsEnabledServerRpc(enabled: true); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); SetLightsEnabledServerRpc(enabled: true); } [ServerRpc(RequireOwnership = false)] public void SetLightsEnabledServerRpc(bool enabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2273025689u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2273025689u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetLightsEnabledClientRpc(enabled); } } } [ClientRpc] public void SetLightsEnabledClientRpc(bool enabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1942781521u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1942781521u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { bool enabled2 = enabled; lights.ForEach(delegate(Light light) { ((Behaviour)light).enabled = enabled2; }); displays.ForEach(delegate(GameObject display) { display.SetActive(enabled2); }); } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_LitNoisemakerProp() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2273025689u, new RpcReceiveHandler(__rpc_handler_2273025689)); NetworkManager.__rpc_func_table.Add(1942781521u, new RpcReceiveHandler(__rpc_handler_1942781521)); } private static void __rpc_handler_2273025689(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lightsEnabledServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lightsEnabledServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LitNoisemakerProp)(object)target).SetLightsEnabledServerRpc(lightsEnabledServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1942781521(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lightsEnabledClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lightsEnabledClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((LitNoisemakerProp)(object)target).SetLightsEnabledClientRpc(lightsEnabledClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LitNoisemakerProp"; } } } namespace TestAccountVariety.Items.DoorScrap { public static class DoorBreachSupport { [CompilerGenerated] private static class <>O { public static DoorBreachEvent <0>__DoorBreached; } public static DoorScrapScript doorScrapScript; public static void Initialize() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown DoorBreachEvent doorBreach = EventHandler.doorBreach; object obj = <>O.<0>__DoorBreached; if (obj == null) { DoorBreachEvent val = DoorBreached; <>O.<0>__DoorBreached = val; obj = (object)val; } EventHandler.doorBreach = (DoorBreachEvent)Delegate.Combine((Delegate?)(object)doorBreach, (Delegate?)obj); } public static void DoorBreached(DoorBreachEventArguments arguments) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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) if (!((NetworkBehaviour)StartOfRound.Instance).IsHost) { return; } Random val = default(Random); ((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF)); int num = ((Random)(ref val)).NextInt(1, 100); if (num > doorScrapScript.doorSpawnChance.Value) { return; } Item item = doorScrapScript.itemWithDefaultWeight.item; Vector3 position = ((Component)arguments.doorLock).transform.position; GameObject spawnPrefab = item.spawnPrefab; GameObject val2 = Object.Instantiate<GameObject>(spawnPrefab, position, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); DoorScrap component = val2.GetComponent<DoorScrap>(); ((Component)component).transform.rotation = Quaternion.Euler(((GrabbableObject)component).itemProperties.restingRotation); ((GrabbableObject)component).fallTime = 0f; ((GrabbableObject)component).scrapValue = ((Random)(ref val)).NextInt((int)((double)item.minValue * 0.4), (int)((double)item.maxValue * 0.4)); string doorType = "SteelDoor"; Transform parent = ((Component)arguments.doorLock).transform.parent.parent; string text = (Object.op_Implicit((Object)(object)parent) ? ((Object)parent).name : null); TestAccountVariety.Logger.LogFatal((object)("Name? " + text)); if (!string.IsNullOrWhiteSpace(text)) { if (text.Contains("YellowMineDoor")) { doorType = "YellowMineDoor"; } Transform parent2 = parent.parent; if (text.Contains("SteelDoor") && Object.op_Implicit((Object)(object)parent2)) { text = ((Object)parent2).name; if (text.Contains("FancyDoor")) { doorType = "FancyDoor"; } } } component.doorType = doorType; NetworkObject component2 = val2.GetComponent<NetworkObject>(); component2.Spawn(false); } } public class DoorScrap : Shovel { public GameObject steelDoorArt; public GameObject fancyDoorArt; public GameObject mineDoorArt; public static readonly string[] PossibleDoorVariations = new string[3] { "SteelDoor", "FancyDoor", "YellowMineDoor" }; public string? doorType; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); SyncScrapValueServerRpc(); SyncDoorTypeServerRpc(); } [ServerRpc(RequireOwnership = false)] public void SyncScrapValueServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(629579620u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 629579620u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SyncScrapValueClientRpc(((GrabbableObject)this).scrapValue); } } } [ClientRpc] public void SyncScrapValueClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(406798397u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 406798397u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((GrabbableObject)this).SetScrapValue(value); } } } [ServerRpc(RequireOwnership = false)] public void SyncDoorTypeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3898058602u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3898058602u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (string.IsNullOrWhiteSpace(doorType)) { Random val3 = default(Random); ((Random)(ref val3))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF)); doorType = PossibleDoorVariations[((Random)(ref val3)).NextInt(0, PossibleDoorVariations.Length)]; } SyncDoorTypeClientRpc(doorType); } } [ClientRpc] public void SyncDoorTypeClientRpc(string doorType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1668637618u, val, (RpcDelivery)0); bool flag = doorType != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(doorType, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1668637618u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { this.doorType = doorType; switch (doorType) { case "SteelDoor": fancyDoorArt.SetActive(false); mineDoorArt.SetActive(false); steelDoorArt.SetActive(true); break; case "YellowMineDoor": steelDoorArt.SetActive(false); fancyDoorArt.SetActive(false); mineDoorArt.SetActive(true); break; case "FancyDoor": steelDoorArt.SetActive(false); mineDoorArt.SetActive(false); fancyDoorArt.SetActive(true); break; } } } protected override void __initializeVariables() { ((Shovel)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_DoorScrap() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(629579620u, new RpcReceiveHandler(__rpc_handler_629579620)); NetworkManager.__rpc_func_table.Add(406798397u, new RpcReceiveHandler(__rpc_handler_406798397)); NetworkManager.__rpc_func_table.Add(3898058602u, new RpcReceiveHandler(__rpc_handler_3898058602)); NetworkManager.__rpc_func_table.Add(1668637618u, new RpcReceiveHandler(__rpc_handler_1668637618)); } private static void __rpc_handler_629579620(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DoorScrap)(object)target).SyncScrapValueServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_406798397(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)2; ((DoorScrap)(object)target).SyncScrapValueClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3898058602(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DoorScrap)(object)target).SyncDoorTypeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1668637618(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string text = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref text, false); } target.__rpc_exec_stage = (__RpcExecStage)2; ((DoorScrap)(object)target).SyncDoorTypeClientRpc(text); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "DoorScrap"; } } [CreateAssetMenu(menuName = "TestAccountVariety/DoorScrapScript", order = 1)] public class DoorScrapScript : CustomScript { public ConfigEntry<int> doorSpawnChance = null; public ItemWithDefaultWeight itemWithDefaultWeight; public override void Initialize(ConfigFile? configFile) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown Object.DontDestroyOnLoad((Object)(object)itemWithDefaultWeight); if (configFile == null) { configFile = ((BaseUnityPlugin)TestAccountVariety.Instance).Config; } if ((Object)(object)itemWithDefaultWeight.item == (Object)null) { throw new ArgumentNullException("item", "ItemProperties cannot be null!"); } string itemName = itemWithDefaultWeight.item.itemName; ConfigEntry<bool> val = configFile.Bind<bool>(itemName ?? "", "1. Enabled", true, "If false, " + itemName + " will not be registered. This is different from a spawn weight of 0!"); if (val.Value) { doorSpawnChance = configFile.Bind<int>(itemName ?? "", "6. Spawn Chance", 35, new ConfigDescription("If DoorBreach is installed, you can set a spawn chance here.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); if (DependencyChecker.IsDoorBreachInstalled()) { DoorBreachSupport.doorScrapScript = this; DoorBreachSupport.Initialize(); } } } } } namespace TestAccountVariety.Items.Dice { public class Dice : GrabbableObject { private static readonly int _RolledAnimatorHash = Animator.StringToHash("Rolled"); public Animator animator; public float animationDuration; public override void GrabItem() { ((GrabbableObject)this).GrabItem(); ResetDiceServerRpc(); } [ServerRpc(RequireOwnership = false)] public void ResetDiceServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2809779056u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2809779056u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ResetDiceClientRpc(); } } } [ClientRpc] public void ResetDiceClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1646565083u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1646565083u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { animator.SetInteger(_RolledAnimatorHash, 0); } } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)base.playerHeldBy == (Object)null) && Object.op_Implicit((Object)(object)base.playerHeldBy)) { PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if (!((Object)(object)base.playerHeldBy != (Object)(object)localPlayerController)) { ((MonoBehaviour)localPlayerController).StartCoroutine(localPlayerController.waitToEndOfFrameToDiscard()); SpinDiceServerRpc((int)localPlayerController.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void SpinDiceServerRpc(int player) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3624177502u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, player); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3624177502u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Random random = new Random(); int result = random.Next(0, 6) + 1; SpinDiceClientRpc(player, result); } } } [ClientRpc] public void SpinDiceClientRpc(int player, int result) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2893414136u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, player); BytePacker.WriteValueBitPacked(val2, result); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2893414136u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && player >= 0 && player < StartOfRound.Instance.allPlayerScripts.Length) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[player]; if (!((Object)(object)val3 == (Object)null) && Object.op_Implicit((Object)(object)val3)) { animator.SetInteger(_RolledAnimatorHash, result); base.grabbable = false; string playerUsername = val3.playerUsername; ((MonoBehaviour)this).StartCoroutine(WaitAndSendResult(animationDuration, playerUsername, result)); } } } public IEnumerator WaitAndSendResult(float secondsToWait, string username, int result) { yield return (object)new WaitForSeconds(secondsToWait); HUDManager.Instance.AddChatMessage($"<color=yellow>{username}</color> rolled <color=red>{result}</color>!", ""); base.grabbable = true; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_Dice() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2809779056u, new RpcReceiveHandler(__rpc_handler_2809779056)); NetworkManager.__rpc_func_table.Add(1646565083u, new RpcReceiveHandler(__rpc_handler_1646565083)); NetworkManager.__rpc_func_table.Add(3624177502u, new RpcReceiveHandler(__rpc_handler_3624177502)); NetworkManager.__rpc_func_table.Add(2893414136u, new RpcReceiveHandler(__rpc_handler_2893414136)); } private static void __rpc_handler_2809779056(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Dice)(object)target).ResetDiceServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1646565083(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((Dice)(object)target).ResetDiceClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3624177502(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); target.__rpc_exec_stage = (__RpcExecStage)1; ((Dice)(object)target).SpinDiceServerRpc(player); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2893414136(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int result = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref result); target.__rpc_exec_stage = (__RpcExecStage)2; ((Dice)(object)target).SpinDiceClientRpc(player, result); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Dice"; } } } namespace TestAccountVariety.Items.CleaningDroneToy { public class CleaningDroneToy : GrabbableObject { public GameObject fogPrefab; public AudioSource audioSource; public AudioClip audioClip; public Coroutine? gasCoroutine; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (gasCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gasCoroutine); } if (!buttonDown) { StopSoundServerRpc(); } else { gasCoroutine = ((MonoBehaviour)this).StartCoroutine(GasEveryone()); } } public override void DiscardItem() { StopSoundServerRpc(); if (gasCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gasCoroutine); } ((GrabbableObject)this).DiscardItem(); } public override void PocketItem() { StopSoundServerRpc(); if (gasCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gasCoroutine); } ((GrabbableObject)this).PocketItem(); } public IEnumerator GasEveryone() { Vector3 position = ((Component)this).transform.position; SpawnGasServerRpc(position); yield return (object)new WaitForSeconds(0.5f); yield return GasEveryone(); } [ServerRpc(RequireOwnership = false)] public void StopSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1794046580u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1794046580u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { StopSoundClientRpc(); } } } [ClientRpc] public void StopSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4190935783u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4190935783u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { audioSource.Stop(); } } } [ServerRpc(RequireOwnership = false)] public void SpawnGasServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1450456784u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1450456784u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SpawnGasClientRpc(position); } } } [ClientRpc] public void SpawnGasClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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) NetworkManager networkMana