Decompiled source of SnowPlaygrounds v1.1.3
SnowPlaygrounds.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LegaFusionCore.Behaviours; using LegaFusionCore.Behaviours.Addons; using LegaFusionCore.Behaviours.Shaders; using LegaFusionCore.Managers; using LegaFusionCore.Managers.NetworkManagers; using LegaFusionCore.Registries; using LegaFusionCore.Utilities; using LethalLib.Extras; using LethalLib.Modules; using Microsoft.CodeAnalysis; using SnowPlaygrounds.Behaviours.Enemies; using SnowPlaygrounds.Behaviours.Items; using SnowPlaygrounds.Behaviours.MapObjects; using SnowPlaygrounds.Managers; using SnowPlaygrounds.NetcodePatcher; using SnowPlaygrounds.Patches; using SnowPlaygrounds.Patches.ModsPatches; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("SnowPlaygrounds")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SnowPlaygrounds")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("da5eb4f1-463c-4837-a533-0c97fb2b145c")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SnowPlaygrounds { public class Constants { public const string GLOBAL = "_Global_"; public const string FAKE_SNOWMAN = "Fake Snowman"; public const string SNOWBALL = "Snowball"; public const string SNOWGUN = "Snowgun"; public const string GLACIAL_DECOY = "Glacial Decoy"; public const string SNOW_PILE = "Snow Pile"; public const string SNOWMAN = "Snowman"; public static Vector3 SNOWMAN_SCALE = new Vector3(2.1f, 2.1f, 2.1f); public const string FROSTBITE = "Frostbite"; public const string SNOWBALL_AMOUNT = "Snowball Amount : "; } [BepInPlugin("Lega.SnowPlaygrounds", "Snow Playgrounds", "1.1.3")] public class SnowPlaygrounds : BaseUnityPlugin { internal const string modGUID = "Lega.SnowPlaygrounds"; internal const string modName = "Snow Playgrounds"; internal const string modVersion = "1.1.3"; private readonly Harmony harmony = new Harmony("Lega.SnowPlaygrounds"); private static readonly AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "snowplaygrounds")); internal static ManualLogSource mls; public static ConfigFile configFile; public static GameObject managerPrefab = NetworkPrefabs.CreateNetworkPrefab("SnowPlaygroundsNetworkManager"); public static GameObject snowballPlayerObj; public static GameObject snowballEnemyObj; public static GameObject snowballGDObj; public static GameObject snowballGunObj; public static GameObject snowgunObj; public static GameObject snowPileObj; public static GameObject snowmanObj; public static List<Snowman> snowmen = new List<Snowman>(); public static EnemyType frostbiteEnemy; public static GameObject snowballDecal; public static HashSet<GameObject> snowballDecals = new HashSet<GameObject>(); public static Material snowShader; public static GameObject snowballParticle; public static GameObject snowmanParticle; public static GameObject snowPoofAudio; public static GameObject snowShootAudio; public static GameObject jumpscareAudio; public void Awake() { mls = Logger.CreateLogSource("SnowPlaygrounds"); configFile = ((BaseUnityPlugin)this).Config; ConfigManager.Load(); LoadManager(); NetcodePatcher(); LoadItems(); LoadHazards(); LoadEnemies(); LoadDecals(); LoadNetworkPrefabs(); LoadShaders(); harmony.PatchAll(typeof(StartOfRoundPatch)); harmony.PatchAll(typeof(RoundManagerPatch)); harmony.PatchAll(typeof(PlayerControllerBPatch)); harmony.PatchAll(typeof(EnemyAIPatch)); PatchOtherMods(harmony); } public static void LoadManager() { Utilities.FixMixerGroups(managerPrefab); managerPrefab.AddComponent<SnowPlaygroundsNetworkManager>(); } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } public void LoadItems() { snowballPlayerObj = RegisterItem(typeof(SnowballPlayer), bundle.LoadAsset<Item>("Assets/Snowball/SP_SnowballPlayerItem.asset")).spawnPrefab; snowgunObj = RegisterItem(typeof(Snowgun), bundle.LoadAsset<Item>("Assets/Snowgun/SP_SnowgunItem.asset")).spawnPrefab; } public Item RegisterItem(Type type, Item item) { if ((Object)(object)item.spawnPrefab.GetComponent(type) == (Object)null) { Component obj = item.spawnPrefab.AddComponent(type); PhysicsProp val = (PhysicsProp)(object)((obj is PhysicsProp) ? obj : null); ((GrabbableObject)val).grabbable = true; ((GrabbableObject)val).grabbableToEnemies = true; ((GrabbableObject)val).itemProperties = item; } NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab); Utilities.FixMixerGroups(item.spawnPrefab); Items.RegisterItem(item); return item; } public void LoadHazards() { snowPileObj = RegisterHazard(bundle.LoadAsset<GameObject>("Assets/SnowPile/SP_SnowPile.prefab"), ConfigManager.isSnowPileInside.Value, ConfigManager.minSnowPileInside.Value, ConfigManager.maxSnowPileInside.Value); snowmanObj = RegisterHazard(bundle.LoadAsset<GameObject>("Assets/Snowman/Prefabs/SP_Snowman.prefab"), ConfigManager.isSnowmanInside.Value, ConfigManager.minSnowmanInside.Value, ConfigManager.maxSnowmanInside.Value); } public GameObject RegisterHazard(GameObject gameObject, bool isInside, float minSpawn, float maxSpawn) { //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_001e: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown SpawnableMapObjectDef val = ScriptableObject.CreateInstance<SpawnableMapObjectDef>(); val.spawnableMapObject = new SpawnableMapObject { prefabToSpawn = gameObject }; AnimationCurve animationCurveInside = new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(minSpawn, maxSpawn) }); NetworkPrefabs.RegisterNetworkPrefab(val.spawnableMapObject.prefabToSpawn); Utilities.FixMixerGroups(val.spawnableMapObject.prefabToSpawn); if (isInside) { if (ConfigManager.anyLevel.Value) { MapObjects.RegisterMapObject(val, (LevelTypes)(-1), (Func<SelectableLevel, AnimationCurve>)((SelectableLevel _) => animationCurveInside)); } else { MapObjects.RegisterMapObject(val, (LevelTypes)1, ConfigManager.spawnLevels.Value.ToLowerInvariant().Split(','), (Func<SelectableLevel, AnimationCurve>)((SelectableLevel _) => animationCurveInside)); } } return val.spawnableMapObject.prefabToSpawn; } public static void LoadEnemies() { frostbiteEnemy = bundle.LoadAsset<EnemyType>("Assets/Frostbite/SP_FrostbiteEnemy.asset"); NetworkPrefabs.RegisterNetworkPrefab(frostbiteEnemy.enemyPrefab); TerminalNode val = bundle.LoadAsset<TerminalNode>("Assets/Frostbite/SP_FrostbiteTN.asset"); TerminalKeyword val2 = bundle.LoadAsset<TerminalKeyword>("Assets/Frostbite/SP_FrostbiteTK.asset"); if (ConfigManager.anyLevel.Value) { Enemies.RegisterEnemy(frostbiteEnemy, ConfigManager.frostbiteRarity.Value, (LevelTypes)(-1), val, val2); } else { Enemies.RegisterEnemy(frostbiteEnemy, ConfigManager.frostbiteRarity.Value, (LevelTypes)1, ConfigManager.spawnLevels.Value.Split(','), val, val2); } } public static void LoadDecals() { snowballDecal = bundle.LoadAsset<GameObject>("Assets/Snowball/Prefabs/SP_SnowballDecal.prefab"); } public static void LoadNetworkPrefabs() { HashSet<GameObject> hashSet = new HashSet<GameObject> { snowballParticle = bundle.LoadAsset<GameObject>("Assets/Snowball/Prefabs/SP_SnowballParticle.prefab"), snowballEnemyObj = bundle.LoadAsset<GameObject>("Assets/Snowball/Prefabs/SP_SnowballEnemy.prefab"), snowballGDObj = bundle.LoadAsset<GameObject>("Assets/Snowball/Prefabs/SP_SnowballGD.prefab"), snowballGunObj = bundle.LoadAsset<GameObject>("Assets/Snowball/Prefabs/SP_SnowballGun.prefab"), snowmanParticle = bundle.LoadAsset<GameObject>("Assets/Snowman/Prefabs/SP_SnowmanParticle.prefab"), snowPoofAudio = bundle.LoadAsset<GameObject>("Assets/SFX/Prefabs/SP_SnowPoofAudio.prefab"), snowShootAudio = bundle.LoadAsset<GameObject>("Assets/SFX/Prefabs/SP_SnowShootAudio.prefab"), jumpscareAudio = bundle.LoadAsset<GameObject>("Assets/Snowman/Prefabs/SP_JumpscareAudio.prefab") }; foreach (GameObject item in hashSet) { NetworkPrefabs.RegisterNetworkPrefab(item); Utilities.FixMixerGroups(item); } } public static void LoadShaders() { snowShader = bundle.LoadAsset<Material>("Assets/Shaders/SP_SnowMaterial.mat"); } public static void PatchOtherMods(Harmony harmony) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown Type type = Type.GetType("ShipInventory.Helpers.ItemManager, ShipInventory"); if (type != null) { harmony.Patch((MethodBase)AccessTools.Method(type, "StoreItem", (Type[])null, (Type[])null), new HarmonyMethod(typeof(ShipInventoryPatch).GetMethod("PreStoreItem")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } public class SPUtilities { public static Coroutine freezeEnemyCoroutine; public static Coroutine targetableCoroutine; public static Snowman SpawnSnowman(Vector3 position, Quaternion rotation) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (Physics.Raycast(position, Vector3.down, ref val, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { GameObject val2 = Object.Instantiate<GameObject>(SnowPlaygrounds.snowmanObj, ((RaycastHit)(ref val)).point, Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, ((Quaternion)(ref rotation)).eulerAngles.z), RoundManager.Instance.mapPropsContainer.transform); NetworkObject component = val2.GetComponent<NetworkObject>(); component.Spawn(true); return ((Component)component).gameObject.GetComponentInChildren<Snowman>(); } return null; } public static void SpawnSnowPile(Vector3 position, Quaternion rotation) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (Physics.Raycast(position, Vector3.down, ref val, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { GameObject val2 = Object.Instantiate<GameObject>(SnowPlaygrounds.snowPileObj, ((RaycastHit)(ref val)).point, Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, ((Quaternion)(ref rotation)).eulerAngles.z), RoundManager.Instance.mapPropsContainer.transform); val2.GetComponent<NetworkObject>().Spawn(true); } } public static void FreezeEnemy(EnemyAI enemy, float duration, float slowdownFactor) { if (freezeEnemyCoroutine != null) { ((MonoBehaviour)enemy).StopCoroutine(freezeEnemyCoroutine); } freezeEnemyCoroutine = ((MonoBehaviour)enemy).StartCoroutine(FreezeEnemyCoroutine(enemy, duration, slowdownFactor)); } private static IEnumerator FreezeEnemyCoroutine(EnemyAI enemy, float duration, float slowdownFactor) { CustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { ((Component)enemy).gameObject }, SnowPlaygrounds.snowShader, "Snow PlaygroundsSnowballFreeze", default(Color)); EnemySpeedBehaviour speedBehaviour = ((Component)enemy).GetComponent<EnemySpeedBehaviour>(); if (speedBehaviour != null) { speedBehaviour.AddSpeedData("Snow Playgrounds", 1f / slowdownFactor - 1f, enemy.agent.speed); } yield return (object)new WaitForSeconds(duration); if (speedBehaviour != null) { speedBehaviour.RemoveSpeedData("Snow Playgrounds"); } CustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { ((Component)enemy).gameObject }, "Snow PlaygroundsSnowballFreeze"); freezeEnemyCoroutine = null; } public static void SetTargetable(PlayerControllerB player, bool targetable, float duration = 0f) { if (targetableCoroutine != null) { ((MonoBehaviour)player).StopCoroutine(targetableCoroutine); targetableCoroutine = null; } if (duration > 0f) { targetableCoroutine = ((MonoBehaviour)player).StartCoroutine(TargetableCoroutine(targetable, duration)); } else { PlayerControllerBPatch.isTargetable = targetable; } } private static IEnumerator TargetableCoroutine(bool targetable, float duration) { yield return (object)new WaitForSeconds(duration); PlayerControllerBPatch.isTargetable = targetable; targetableCoroutine = null; } public static void ApplyDecal(Vector3 point, Vector3 normal) { //IL_0011: 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: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(SnowPlaygrounds.snowballDecal); val.transform.position = point + normal * 0.01f; val.transform.forward = normal; SnowPlaygrounds.snowballDecals.Add(val); SnowballImpact(val.transform.position, Quaternion.LookRotation(normal)); } public static void SnowballImpact(Vector3 position, Quaternion rotation) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) PlayAudio(SnowPlaygrounds.snowPoofAudio, position); GameObject val = Object.Instantiate<GameObject>(SnowPlaygrounds.snowballParticle, position, rotation); ParticleSystem component = val.GetComponent<ParticleSystem>(); MainModule main = component.main; float duration = ((MainModule)(ref main)).duration; main = component.main; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; Object.Destroy((Object)(object)val, duration + ((MinMaxCurve)(ref startLifetime)).constantMax); } public static void PlaySnowmanParticle(Vector3 position, Quaternion rotation) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) PlayAudio(SnowPlaygrounds.snowPoofAudio, position); GameObject val = Object.Instantiate<GameObject>(SnowPlaygrounds.snowmanParticle, position, rotation); ParticleSystem component = val.GetComponent<ParticleSystem>(); MainModule main = component.main; float duration = ((MainModule)(ref main)).duration; main = component.main; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; Object.Destroy((Object)(object)val, duration + ((MinMaxCurve)(ref startLifetime)).constantMax); } public static void PlayAudio(GameObject audioPrefab, Vector3 position, float volume = 1f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(audioPrefab, position, Quaternion.identity); AudioSource component = val.GetComponent<AudioSource>(); component.volume = volume; Object.Destroy((Object)(object)val, component.clip.length); } public static void DespawnSnowmanEndGame(StartOfRound startOfRound) { if (!((NetworkBehaviour)startOfRound).IsHost) { return; } foreach (Snowman snowman in SnowPlaygrounds.snowmen) { if ((Object)(object)snowman == (Object)null) { continue; } if (snowman.isPlayerHiding) { snowman.ExitSnowmanEveryoneRpc((int)snowman.hidingPlayer.playerClientId); continue; } NetworkObject component = ((Component)snowman).GetComponent<NetworkObject>(); if (!((Object)(object)component == (Object)null) && component.IsSpawned) { component.Despawn(true); } } SnowPlaygrounds.snowmen.Clear(); } public static void ClearSnowballDecals() { SnowPlaygrounds.snowballDecals.ToList().ForEach((Action<GameObject>)Object.Destroy); SnowPlaygrounds.snowballDecals.Clear(); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "SnowPlaygrounds"; public const string PLUGIN_NAME = "SnowPlaygrounds"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace SnowPlaygrounds.Patches { internal class EnemyAIPatch { [HarmonyPatch(typeof(EnemyAI), "PlayerIsTargetable")] [HarmonyPrefix] private static bool IsPlayerTargetable(ref bool __result) { if (!PlayerControllerBPatch.isTargetable) { return __result = false; } return true; } } internal class PlayerControllerBPatch { public static bool isTargetable = true; [HarmonyPatch(typeof(PlayerControllerB), "PlayerLookInput")] [HarmonyPrefix] private static bool HandleSnowmanCamera(ref PlayerControllerB __instance) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return true; } Snowman componentInChildren = ((Component)__instance).GetComponentInChildren<Snowman>(); if ((Object)(object)componentInChildren == (Object)null) { return true; } if (__instance.quickMenuManager.isMenuOpen) { return true; } MovementActions movement = __instance.playerActions.Movement; Vector2 val = ((MovementActions)(ref movement)).Look.ReadValue<Vector2>() * (float)IngamePlayerSettings.Instance.settings.lookSensitivity * 0.008f; componentInChildren.cameraPivot.Rotate(new Vector3(0f, val.x, 0f)); float num = componentInChildren.cameraPivot.localEulerAngles.x - val.y; num = ((num > 180f) ? (num - 360f) : num); num = Mathf.Clamp(num, -45f, 45f); componentInChildren.cameraPivot.localEulerAngles = new Vector3(num, componentInChildren.cameraPivot.localEulerAngles.y, 0f); return false; } [HarmonyPatch(typeof(PlayerControllerB), "ItemSecondaryUse_performed")] [HarmonyPostfix] private static void SecondaryUsePerformed(ref PlayerControllerB __instance) { if (!((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { Snowman componentInChildren = ((Component)__instance).GetComponentInChildren<Snowman>(); if (!((Object)(object)componentInChildren?.hidingPlayer == (Object)null) && !((Object)(object)componentInChildren.hidingPlayer != (Object)(object)__instance)) { componentInChildren.ExitSnowman(); } } } [HarmonyPatch(typeof(PlayerControllerB), "DiscardHeldObject")] [HarmonyPrefix] private static bool PreDropObject(ref PlayerControllerB __instance) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (__instance.currentlyHeldObjectServer is SnowballPlayer snowballPlayer && !snowballPlayer.isThrown) { if (StartOfRound.Instance.shipHasLanded && __instance.isCrouching) { SnowPlaygroundsNetworkManager.Instance.SpawnSnowmanFromSnowballServerRpc((int)__instance.playerClientId, NetworkObjectReference.op_Implicit(((Component)snowballPlayer).GetComponent<NetworkObject>()), ((Component)__instance.gameplayCamera).transform.position + ((Component)__instance.gameplayCamera).transform.forward, ((Component)__instance).transform.rotation); return false; } snowballPlayer.DropSnowballServerRpc((int)__instance.playerClientId); return false; } return true; } [HarmonyPatch(typeof(PlayerControllerB), "DropAllHeldItems")] [HarmonyPrefix] private static void PreDropAllObjects(ref PlayerControllerB __instance) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) bool flag = false; for (int i = 0; i < __instance.ItemSlots.Length; i++) { GrabbableObject val = __instance.ItemSlots[i]; if (!((Object)(object)val == (Object)null) && val is SnowballPlayer && ((NetworkBehaviour)val).IsSpawned) { __instance.DestroyItemInSlot(i); flag = true; } } RaycastHit val2 = default(RaycastHit); if (flag && Physics.Raycast(((Component)__instance).transform.position + Vector3.up, Vector3.down, ref val2, 2f, 605030721, (QueryTriggerInteraction)2)) { SPUtilities.ApplyDecal(((RaycastHit)(ref val2)).point, ((RaycastHit)(ref val2)).normal); } } [HarmonyPatch(typeof(PlayerControllerB), "SetHoverTipAndCurrentInteractTrigger")] [HarmonyPrefix] private static bool SnowmanInteractTrigger(ref PlayerControllerB __instance) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (__instance.isGrabbingObjectAnimation || __instance.inSpecialMenu || __instance.quickMenuManager.isMenuOpen) { return true; } __instance.interactRay = new Ray(((Component)__instance.gameplayCamera).transform.position, ((Component)__instance.gameplayCamera).transform.forward); if (Physics.Raycast(__instance.interactRay, ref __instance.hit, __instance.grabDistance, __instance.interactableObjectsMask) && ((Component)((RaycastHit)(ref __instance.hit)).collider).gameObject.layer != 8 && ((Component)((RaycastHit)(ref __instance.hit)).collider).gameObject.layer != 30) { if (!((Component)((RaycastHit)(ref __instance.hit)).collider).tag.Equals("InteractTrigger")) { return true; } Snowman componentInParent = ((Component)((RaycastHit)(ref __instance.hit)).collider).gameObject.GetComponentInParent<Snowman>(); if ((Object)(object)componentInParent == (Object)null) { return true; } __instance.hoveringOverTrigger = componentInParent.snowmanTrigger; if (!__instance.isHoldingInteract) { ((Behaviour)__instance.cursorIcon).enabled = true; __instance.cursorIcon.sprite = componentInParent.snowmanTrigger.hoverIcon; ((TMP_Text)__instance.cursorTip).text = componentInParent.snowmanTrigger.hoverTip; } FormatCursorTip(__instance); return false; } return true; } private static void FormatCursorTip(PlayerControllerB player) { if (StartOfRound.Instance.localPlayerUsingController) { StringBuilder stringBuilder = new StringBuilder(((TMP_Text)player.cursorTip).text); stringBuilder.Replace("[E]", "[X]"); stringBuilder.Replace("[LMB]", "[X]"); stringBuilder.Replace("[RMB]", "[R-Trigger]"); stringBuilder.Replace("[F]", "[R-Shoulder]"); stringBuilder.Replace("[Z]", "[L-Shoulder]"); ((TMP_Text)player.cursorTip).text = stringBuilder.ToString(); } else { ((TMP_Text)player.cursorTip).text = ((TMP_Text)player.cursorTip).text.Replace("[LMB]", "[E]"); } } } internal class RoundManagerPatch { [HarmonyPatch(typeof(RoundManager), "SpawnMapObjects")] [HarmonyPostfix] private static void SpawnInsideHazards(ref RoundManager __instance) { if (((NetworkBehaviour)__instance).IsHost) { LFCUtilities.Shuffle<GameObject>((IList<GameObject>)__instance.insideAINodes); } } [HarmonyPatch(typeof(RoundManager), "SpawnOutsideHazards")] [HarmonyPostfix] private static void SpawnOutsideHazards(ref RoundManager __instance) { if (!((NetworkBehaviour)__instance).IsHost || (!ConfigManager.anyLevel.Value && !ConfigManager.spawnLevels.Value.Contains(((Object)__instance.currentLevel).name.ToLowerInvariant()) && !ConfigManager.spawnWeathers.Value.Contains(((object)(LevelWeatherType)(ref __instance.currentLevel.currentWeather)).ToString()))) { return; } LFCUtilities.Shuffle<GameObject>((IList<GameObject>)__instance.outsideAINodes); if (ConfigManager.isSnowmanOutside.Value) { SpawnHazard(__instance, ConfigManager.minSnowmanOutside.Value, ConfigManager.maxSnowmanOutside.Value, delegate(Vector3 pos, Quaternion rot) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) SPUtilities.SpawnSnowman(pos, rot); }); } if (ConfigManager.isSnowPileOutside.Value) { SpawnHazard(__instance, ConfigManager.minSnowmanOutside.Value, ConfigManager.maxSnowPileOutside.Value, SPUtilities.SpawnSnowPile); } } private static void SpawnHazard(RoundManager roundManager, int minHazard, int maxHazard, Action<Vector3, Quaternion> spawnMethod) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) Random random = new Random(); for (int i = 0; i < random.Next(minHazard, maxHazard); i++) { GameObject[] outsideAINodes = roundManager.outsideAINodes; Vector3 position = outsideAINodes[random.Next(0, outsideAINodes.Length)].transform.position; position = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(position, 10f, default(NavMeshHit), random, -1, 1f) + Vector3.up; spawnMethod(position, Quaternion.identity); } } [HarmonyPatch(typeof(RoundManager), "GeneratedFloorPostProcessing")] [HarmonyPostfix] private static void AddFakeSnowman(ref RoundManager __instance) { if (((NetworkBehaviour)__instance).IsHost && (ConfigManager.anyLevel.Value || ConfigManager.spawnLevels.Value.Contains(((Object)__instance.currentLevel).name.ToLowerInvariant()) || ConfigManager.spawnWeathers.Value.Contains(((object)(LevelWeatherType)(ref __instance.currentLevel.currentWeather)).ToString()))) { SnowPlaygrounds.snowmen.AddRange(Object.FindObjectsOfType<Snowman>()); Random random = new Random(); List<Snowman> list = SnowPlaygrounds.snowmen.OrderBy((Snowman s) => random.Next()).Take(random.Next(ConfigManager.minFakeSnowman.Value, ConfigManager.maxFakeSnowman.Value)).ToList(); list.ForEach(delegate(Snowman s) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) SnowPlaygroundsNetworkManager.Instance.AddFakeSnowmanEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)s).GetComponent<NetworkObject>())); }); } } } internal class StartOfRoundPatch { [HarmonyPatch(typeof(StartOfRound), "Start")] [HarmonyBefore(new string[] { "evaisa.lethallib" })] [HarmonyPostfix] private static void StartRound(ref StartOfRound __instance) { if (NetworkManager.Singleton.IsHost && (Object)(object)SnowPlaygroundsNetworkManager.Instance == (Object)null) { GameObject val = Object.Instantiate<GameObject>(SnowPlaygrounds.managerPrefab, ((Component)__instance).transform.parent); val.GetComponent<NetworkObject>().Spawn(false); SnowPlaygrounds.mls.LogInfo((object)"Spawning SnowPlaygroundsNetworkManager"); } } [HarmonyPatch(typeof(StartOfRound), "StartGame")] [HarmonyPostfix] public static void StartOfGame() { SnowPlaygrounds.snowmen.Clear(); SPUtilities.ClearSnowballDecals(); } [HarmonyPatch(typeof(StartOfRound), "EndOfGame")] [HarmonyPostfix] public static void EndOfGame(ref StartOfRound __instance) { SPUtilities.DespawnSnowmanEndGame(__instance); SPUtilities.ClearSnowballDecals(); } [HarmonyPatch(typeof(StartOfRound), "OnDisable")] [HarmonyPostfix] public static void OnDisable() { SnowPlaygroundsNetworkManager.Instance = null; } } } namespace SnowPlaygrounds.Patches.ModsPatches { [HarmonyPatch] internal class ShipInventoryPatch { public static bool PreStoreItem(GrabbableObject item) { return !(item is SnowballPlayer); } } } namespace SnowPlaygrounds.Managers { public class ConfigManager { public static ConfigEntry<bool> anyLevel; public static ConfigEntry<string> spawnLevels; public static ConfigEntry<string> spawnWeathers; public static ConfigEntry<string> snowShaderExclusions; public static ConfigEntry<int> snowPileAmount; public static ConfigEntry<bool> isSnowPileInside; public static ConfigEntry<int> minSnowPileInside; public static ConfigEntry<int> maxSnowPileInside; public static ConfigEntry<bool> isSnowPileOutside; public static ConfigEntry<int> minSnowPileOutside; public static ConfigEntry<int> maxSnowPileOutside; public static ConfigEntry<int> snowballAmount; public static ConfigEntry<float> snowballPushForce; public static ConfigEntry<float> snowballSlowdownDuration; public static ConfigEntry<float> snowballSlowdownFactor; public static ConfigEntry<float> snowballThrowCooldown; public static ConfigEntry<bool> isSnowmanInside; public static ConfigEntry<int> minSnowmanInside; public static ConfigEntry<int> maxSnowmanInside; public static ConfigEntry<bool> isSnowmanOutside; public static ConfigEntry<int> minSnowmanOutside; public static ConfigEntry<int> maxSnowmanOutside; public static ConfigEntry<int> amountSnowballToBuild; public static ConfigEntry<float> snowmanSlowdownDuration; public static ConfigEntry<float> snowmanSlowdownFactor; public static ConfigEntry<bool> isJumpscareOn; public static ConfigEntry<float> jumpscareVolume; public static ConfigEntry<int> minFakeSnowman; public static ConfigEntry<int> maxFakeSnowman; public static ConfigEntry<int> frostbiteRarity; public static ConfigEntry<bool> frostbiteEating; public static ConfigEntry<int> frostbiteDamage; public static ConfigEntry<float> frostbiteMinCooldown; public static ConfigEntry<float> frostbiteMaxCooldown; public static ConfigEntry<float> frostbiteSnowballSpeedInside; public static ConfigEntry<float> frostbiteSnowballSpeedOutside; public static ConfigEntry<int> frostbiteSnowballDamage; public static ConfigEntry<float> frostbiteFreezeDuration; public static ConfigEntry<float> frostbiteHitIncrement; public static ConfigEntry<float> frostbiteHitMax; public static ConfigEntry<int> snowgunAmount; public static ConfigEntry<int> glacialDecoyCooldown; public static void Load() { anyLevel = SnowPlaygrounds.configFile.Bind<bool>("_Global_", "Any level", true, "If true, the hazards can spawn on any level"); spawnLevels = SnowPlaygrounds.configFile.Bind<string>("_Global_", "Spawn levels", "tundralevel,titanlevel,dinelevel,rendlevel", "Name of the levels where the hazards can spawn"); spawnWeathers = SnowPlaygrounds.configFile.Bind<string>("_Global_", "Spawn weathers", "Blizzard,Snowfall", "Name of the weathers where the hazards can spawn"); snowShaderExclusions = SnowPlaygrounds.configFile.Bind<string>("_Global_", "Snow shader exclusions", "Red Locust Bees", "List of creatures that are not affected by the snow shader, but are still slowed down"); snowPileAmount = SnowPlaygrounds.configFile.Bind<int>("Snow Pile", "Amount", 20, "Amount of snow in a Snow Pile"); isSnowPileInside = SnowPlaygrounds.configFile.Bind<bool>("Snow Pile", "Can spawn inside", true, "Can Snow Pile spawn inside"); minSnowPileInside = SnowPlaygrounds.configFile.Bind<int>("Snow Pile", "Min spawn inside", 5, "Min Snow Pile to spawn"); maxSnowPileInside = SnowPlaygrounds.configFile.Bind<int>("Snow Pile", "Max spawn inside", 8, "Max Snow Pile to spawn"); isSnowPileOutside = SnowPlaygrounds.configFile.Bind<bool>("Snow Pile", "Can spawn outside", true, "Can Snow Pile spawn outside"); minSnowPileOutside = SnowPlaygrounds.configFile.Bind<int>("Snow Pile", "Min spawn outside", 2, "Min Snow Pile to spawn"); maxSnowPileOutside = SnowPlaygrounds.configFile.Bind<int>("Snow Pile", "Max spawn outside", 4, "Max Snow Pile to spawn"); snowballAmount = SnowPlaygrounds.configFile.Bind<int>("Snowball", "Amount", 5, "Amount of Snowball per slot"); snowballPushForce = SnowPlaygrounds.configFile.Bind<float>("Snowball", "Push force", 1f, "Push force applied to target player"); snowballSlowdownDuration = SnowPlaygrounds.configFile.Bind<float>("Snowball", "Slowdown duration", 1f, "Slowdown duration applied to targeted enemy"); snowballSlowdownFactor = SnowPlaygrounds.configFile.Bind<float>("Snowball", "Slowdown factor", 3f, "Slowdown factor applied to targeted enemy"); snowballThrowCooldown = SnowPlaygrounds.configFile.Bind<float>("Snowball", "Throw cooldown", 1f, "Snowball throw cooldown"); isSnowmanInside = SnowPlaygrounds.configFile.Bind<bool>("Snowman", "Can spawn inside", true, "Can Snowman spawn inside"); minSnowmanInside = SnowPlaygrounds.configFile.Bind<int>("Snowman", "Min spawn inside", 2, "Min Snowman to spawn"); maxSnowmanInside = SnowPlaygrounds.configFile.Bind<int>("Snowman", "Max spawn inside", 3, "Max Snowman to spawn"); isSnowmanOutside = SnowPlaygrounds.configFile.Bind<bool>("Snowman", "Can spawn outside", true, "Can Snowman spawn outside"); minSnowmanOutside = SnowPlaygrounds.configFile.Bind<int>("Snowman", "Min spawn outside", 2, "Min Snowman to spawn"); maxSnowmanOutside = SnowPlaygrounds.configFile.Bind<int>("Snowman", "Max spawn outside", 3, "Max Snowman to spawn"); amountSnowballToBuild = SnowPlaygrounds.configFile.Bind<int>("Snowman", "Amount snowball", 20, "Amout of Snowball required to build a Snowman"); snowmanSlowdownDuration = SnowPlaygrounds.configFile.Bind<float>("Snowman", "Slowdown duration", 4f, "Slowdown duration applied to targeted enemy"); snowmanSlowdownFactor = SnowPlaygrounds.configFile.Bind<float>("Snowman", "Slowdown factor", 3f, "Slowdown factor applied to targeted enemy"); isJumpscareOn = SnowPlaygrounds.configFile.Bind<bool>("Fake Snowman", "Enable jumpscare", true, "Enable jumpscare audio"); jumpscareVolume = SnowPlaygrounds.configFile.Bind<float>("Fake Snowman", "Jumpscare volume", 0.5f, "Jumpscare audio volume"); minFakeSnowman = SnowPlaygrounds.configFile.Bind<int>("Fake Snowman", "Min spawn", 1, "Min Fake Snowman to spawn by default"); maxFakeSnowman = SnowPlaygrounds.configFile.Bind<int>("Fake Snowman", "Max spawn", 2, "Max Fake Snowman to spawn by default"); frostbiteRarity = SnowPlaygrounds.configFile.Bind<int>("Frostbite", "Rarity", 10, "Frostbite rarity"); frostbiteEating = SnowPlaygrounds.configFile.Bind<bool>("Frostbite", "Eat the player?", true, "Does Frostbite eat the player on collision?"); frostbiteDamage = SnowPlaygrounds.configFile.Bind<int>("Frostbite", "Damage", 20, "Frostbite damages on collision, does not apply if 'Eat the player?' is true"); frostbiteMinCooldown = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Min cooldown", 1f, "Minimum cooldown between Snowball throws"); frostbiteMaxCooldown = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Max cooldown", 1.75f, "Maximum cooldown between Snowball throws"); frostbiteSnowballSpeedInside = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Snowball speed inside", 30f, "Snowball speed when Frostbite is inside the dungeon"); frostbiteSnowballSpeedOutside = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Snowball speed outside", 45f, "Snowball speed when Frostbite is outside the dungeon"); frostbiteSnowballDamage = SnowPlaygrounds.configFile.Bind<int>("Frostbite", "Snowball damage", 5, "Snowball damage"); frostbiteFreezeDuration = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Freeze duration", 2f, "Freeze duration when a player is hit by a Snowball"); frostbiteHitIncrement = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Hit increment", 0.1f, "Hit increment - this value starts at 1 and is used as a multiplier for the enemy's speed and the damage inflicted by his Snowball"); frostbiteHitMax = SnowPlaygrounds.configFile.Bind<float>("Frostbite", "Hit max value", 2f, "Max hit value before the Frostbite dies, this value is reached through the increments of the previous values"); snowgunAmount = SnowPlaygrounds.configFile.Bind<int>("Snowgun", "Amount", 20, "Amount of snow in a Snowgun"); glacialDecoyCooldown = SnowPlaygrounds.configFile.Bind<int>("Glacial Decoy", "Cooldown", 45, "Cooldown duration of the Glacial Decoy"); } } public static class SnowballManager { public static void ThrowSnowballFromPlayer(PlayerControllerB player, Rigidbody rigidbody, float horizontalSpeed) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_003b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)player.gameplayCamera).transform.forward; float num = -2f; if (val.y < num) { Vector3 val2 = new Vector3(val.x, num, val.z); val = ((Vector3)(ref val2)).normalized; } Vector3 val3 = val * horizontalSpeed; Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(0f, 3f, 0f); rigidbody.velocity = Vector3.zero; rigidbody.AddForce(val3, (ForceMode)2); rigidbody.AddForce(val4, (ForceMode)2); } public static bool HandleEnemyHitFromPlayer(Collider other, Vector3 position, PlayerControllerB throwingPlayer) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) EnemyAICollisionDetect component = ((Component)other).GetComponent<EnemyAICollisionDetect>(); if ((Object)(object)component == (Object)null) { return false; } SnowPlaygroundsNetworkManager.Instance.SnowballFreezeEnemyEveryoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component.mainScript).NetworkObject), other.ClosestPoint(position), ((Component)throwingPlayer).transform.rotation); return true; } public static bool HandlePlayerHitFromPlayer(Collider other, Vector3 position, PlayerControllerB throwingPlayer) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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) PlayerControllerB component = ((Component)other).GetComponent<PlayerControllerB>(); if ((Object)(object)component == (Object)null || (Object)(object)component == (Object)(object)throwingPlayer) { return false; } Vector3 val = ((Component)component).transform.position - ((Component)throwingPlayer).transform.position; Vector3 force = ((Vector3)(ref val)).normalized * ConfigManager.snowballPushForce.Value; SnowPlaygroundsNetworkManager.Instance.SnowballHitPlayerEveryoneRpc((int)component.playerClientId, force, other.ClosestPoint(position)); return true; } public static bool HandleSnowmanHit(Collider other) { Snowman component = ((Component)other).GetComponent<Snowman>(); if ((Object)(object)component == (Object)null) { return false; } if (component.isEnemyHiding) { component.SpawnFrostbiteServerRpc(); } else if ((Object)(object)component.hidingPlayer != (Object)null) { component.ExitSnowmanEveryoneRpc((int)component.hidingPlayer.playerClientId); } else { Object.Destroy((Object)(object)((Component)component).gameObject); } return true; } } public class SnowPlaygroundsNetworkManager : NetworkBehaviour { public static SnowPlaygroundsNetworkManager Instance; public void Awake() { Instance = this; } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnSnowmanFromSnowballServerRpc(int playerId, NetworkObjectReference obj, Vector3 position, Quaternion rotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1747531572u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref rotation); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1747531572u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { SnowballPlayer snowballPlayer = ((Component)val4).gameObject.GetComponentInChildren<GrabbableObject>() as SnowballPlayer; RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(position, Vector3.down, ref val5, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { GameObject val6 = Object.Instantiate<GameObject>(SnowPlaygrounds.snowmanObj, ((RaycastHit)(ref val5)).point, Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, ((Quaternion)(ref rotation)).eulerAngles.z), RoundManager.Instance.mapPropsContainer.transform); val6.transform.localScale = Constants.SNOWMAN_SCALE / (float)ConfigManager.amountSnowballToBuild.Value * (float)snowballPlayer.currentStackedItems; NetworkObject component = val6.GetComponent<NetworkObject>(); component.Spawn(true); SpawnSnowmanEveryoneRpc(playerId, NetworkObjectReference.op_Implicit(component), snowballPlayer.currentStackedItems); snowballPlayer.DestroySnowballEveryoneRpc(); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnSnowmanEveryoneRpc(int playerId, NetworkObjectReference obj, int nbSnowball) { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1368642794u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val3, nbSnowball); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1368642794u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (!((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { return; } Snowman componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<Snowman>(); componentInChildren.currentStackedSnowball = nbSnowball; componentInChildren.RefreshHoverTip(); PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(((Component)component.gameplayCamera).transform.position + ((Component)component.gameplayCamera).transform.forward, Vector3.down, ref val5, 80f, 1342179585, (QueryTriggerInteraction)1)) { PlayerPhysicsRegion componentInChildren2 = ((Component)((Component)((RaycastHit)(ref val5)).collider).gameObject.transform).GetComponentInChildren<PlayerPhysicsRegion>(); if ((Object)(object)componentInChildren2?.parentNetworkObject != (Object)null && componentInChildren2.allowDroppingItems && componentInChildren2.itemDropCollider.ClosestPoint(((RaycastHit)(ref val5)).point) == ((RaycastHit)(ref val5)).point) { ((Component)componentInChildren).transform.SetParent(componentInChildren2.physicsTransform); ((Component)componentInChildren).transform.localPosition = componentInChildren2.physicsTransform.InverseTransformPoint(((RaycastHit)(ref val5)).point + Vector3.up * 0.04f + componentInChildren2.addPositionOffsetToItems); Transform transform = ((Component)componentInChildren).transform; Quaternion rotation = ((Component)component).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = ((Component)component).transform.rotation; transform.rotation = Quaternion.Euler(0f, y, ((Quaternion)(ref rotation)).eulerAngles.z); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void AddFakeSnowmanEveryoneRpc(NetworkObjectReference obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1142987429u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1142987429u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { Snowman componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<Snowman>(); componentInChildren.snowmanTrigger.interactable = false; componentInChildren.isEnemyHiding = true; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DestroySnowmanServerRpc(NetworkObjectReference obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3183850724u, val2, val, (SendTo)2, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3183850724u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { Snowman componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<Snowman>(); Object.Destroy((Object)(object)((Component)componentInChildren).gameObject); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SnowballFreezeEnemyEveryoneRpc(NetworkObjectReference enemyObject, Vector3 position, Quaternion rotation, bool isEnemySnowball = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(731675596u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref enemyObject, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref rotation); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref isEnemySnowball, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 731675596u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (!((NetworkObjectReference)(ref enemyObject)).TryGet(ref val4, (NetworkManager)null)) { return; } SPUtilities.SnowballImpact(position, rotation); EnemyAI componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<EnemyAI>(); if ((Object)(object)componentInChildren != (Object)null) { if (componentInChildren is FrostbiteAI frostbiteAI) { frostbiteAI.HitFrostbite(isEnemySnowball); } else { SPUtilities.FreezeEnemy(componentInChildren, ConfigManager.snowballSlowdownDuration.Value, ConfigManager.snowballSlowdownFactor.Value); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SnowballHitPlayerEveryoneRpc(int playerId, Vector3 force, 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(114906917u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref force); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendRpc(ref val3, 114906917u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); SPUtilities.SnowballImpact(position, ((Component)component).transform.rotation); if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)component) { component.thisController.Move(force); HUDManager.Instance.flashFilter = Mathf.Min(1f, HUDManager.Instance.flashFilter + 0.4f); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ShootGlacialDecoyServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1878508405u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1878508405u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val4 = Object.Instantiate<GameObject>(SnowPlaygrounds.snowballGDObj, ((Component)this).transform.position - ((Component)this).transform.forward * 0.5f, Quaternion.identity, StartOfRound.Instance.propsContainer); SnowballGD component = val4.GetComponent<SnowballGD>(); val4.GetComponent<NetworkObject>().Spawn(false); component.ShootSnowballEveryoneRpc(playerId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ApplyFrostEveryoneRpc(int playerId, NetworkObjectReference enemyObj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1611184169u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref enemyObj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1611184169u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref enemyObj)).TryGet(ref val4, (NetworkManager)null)) { EnemyAI componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<EnemyAI>(); LFCStatusEffectRegistry.ApplyStatus(((Component)componentInChildren).gameObject, (StatusEffectType)1, playerId, 10, 100, (Action)null, (Action)null, (Action)null); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ApplyFrostEveryoneRpc(int playerId, int targetId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1242344389u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); BytePacker.WriteValueBitPacked(val3, targetId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1242344389u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[targetId].GetComponent<PlayerControllerB>(); LFCStatusEffectRegistry.ApplyStatus(((Component)component).gameObject, (StatusEffectType)1, playerId, 10, 10, (Action)null, (Action)null, (Action)null); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1747531572u, new RpcReceiveHandler(__rpc_handler_1747531572), "SpawnSnowmanFromSnowballServerRpc"); ((NetworkBehaviour)this).__registerRpc(1368642794u, new RpcReceiveHandler(__rpc_handler_1368642794), "SpawnSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1142987429u, new RpcReceiveHandler(__rpc_handler_1142987429), "AddFakeSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3183850724u, new RpcReceiveHandler(__rpc_handler_3183850724), "DestroySnowmanServerRpc"); ((NetworkBehaviour)this).__registerRpc(731675596u, new RpcReceiveHandler(__rpc_handler_731675596), "SnowballFreezeEnemyEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(114906917u, new RpcReceiveHandler(__rpc_handler_114906917), "SnowballHitPlayerEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1878508405u, new RpcReceiveHandler(__rpc_handler_1878508405), "ShootGlacialDecoyServerRpc"); ((NetworkBehaviour)this).__registerRpc(1611184169u, new RpcReceiveHandler(__rpc_handler_1611184169), "ApplyFrostEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1242344389u, new RpcReceiveHandler(__rpc_handler_1242344389), "ApplyFrostEveryoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1747531572(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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); Quaternion rotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SpawnSnowmanFromSnowballServerRpc(playerId, obj, position, rotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1368642794(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); int nbSnowball = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowball); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SpawnSnowmanEveryoneRpc(playerId, obj, nbSnowball); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1142987429(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_004f: 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) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).AddFakeSnowmanEveryoneRpc(obj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3183850724(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_004f: 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) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).DestroySnowmanServerRpc(obj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_731675596(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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference enemyObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref enemyObject, default(ForNetworkSerializable)); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); Quaternion rotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rotation); bool isEnemySnowball = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isEnemySnowball, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SnowballFreezeEnemyEveryoneRpc(enemyObject, position, rotation, isEnemySnowball); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_114906917(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 force = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref force); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SnowballHitPlayerEveryoneRpc(playerId, force, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1878508405(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).ShootGlacialDecoyServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1611184169(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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); NetworkObjectReference enemyObj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref enemyObj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).ApplyFrostEveryoneRpc(playerId, enemyObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1242344389(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int targetId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref targetId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).ApplyFrostEveryoneRpc(playerId, targetId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowPlaygroundsNetworkManager"; } } } namespace SnowPlaygrounds.Behaviours.MapObjects { public class Snowman : NetworkBehaviour, IHittable { public InteractTrigger snowmanTrigger; public Camera camera; public Transform cameraPivot; private Camera playerCamera; public int currentStackedSnowball; public bool isPlayerHiding; public PlayerControllerB hidingPlayer; public bool isEnemyHiding; private void Start() { if (currentStackedSnowball == 0) { currentStackedSnowball = ConfigManager.amountSnowballToBuild.Value; } playerCamera = GameNetworkManager.Instance.localPlayerController.gameplayCamera; } public void Update() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (!isEnemyHiding) { return; } Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, 7f, StartOfRound.Instance.playersMask, (QueryTriggerInteraction)2); Collider[] array2 = array; foreach (Collider val in array2) { PlayerControllerB component = ((Component)val).GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { SpawnFrostbiteServerRpc(); break; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnFrostbiteServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2126077130u, val2, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2126077130u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; SpawnFrostbiteEveryoneRpc(); GameObject val4 = Object.Instantiate<GameObject>(SnowPlaygrounds.frostbiteEnemy.enemyPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val4.GetComponentInChildren<NetworkObject>().Spawn(true); ((EnemyAI)val4.GetComponent<FrostbiteAI>()).moveTowardsDestination = true; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnFrostbiteEveryoneRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(547426965u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 547426965u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (ConfigManager.isJumpscareOn.Value) { SPUtilities.PlayAudio(SnowPlaygrounds.jumpscareAudio, ((Component)this).transform.position, ConfigManager.jumpscareVolume.Value); } if (LFCUtilities.IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public void SnowmanInteraction() { if (currentStackedSnowball < ConfigManager.amountSnowballToBuild.Value) { BuildSnowman(); } else if ((Object)(object)hidingPlayer == (Object)null) { EnterSnowmanEveryoneRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } public void BuildSnowman() { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; int num