Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SnowPlaygrounds v1.1.8
SnowPlaygrounds.dll
Decompiled 2 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; using LegaFusionCore.Behaviours; using LegaFusionCore.Managers; using LegaFusionCore.Managers.NetworkManagers; using LegaFusionCore.Registries; using LegaFusionCore.Utilities; using LethalLib.Extras; using LethalLib.Modules; using LethalStatus.Managers; using LethalStatus.StatusEffects; using Microsoft.CodeAnalysis; using SnowPlaygrounds.Behaviours.Enemies; using SnowPlaygrounds.Behaviours.Items; using SnowPlaygrounds.Behaviours.MapObjects; using SnowPlaygrounds.Managers; using SnowPlaygrounds.ModsCompat; using SnowPlaygrounds.NetcodePatcher; using SnowPlaygrounds.Patches; using TMPro; using Unity.Netcode; using UnityEngine; [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("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: 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 ADDONS = "Addons"; public const string FROST_MARK = "Frost Mark"; 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 ICE_ZONE = "Ice Zone"; public const string FROSTBITE = "Frostbite"; public const string SNOWBALL_AMOUNT = "Snowball Amount : "; } [BepInPlugin("Lega.SnowPlaygrounds", "Snow Playgrounds", "1.1.8")] public class SnowPlaygrounds : BaseUnityPlugin { public const string modGUID = "Lega.SnowPlaygrounds"; public const string modName = "Snow Playgrounds"; public const string modVersion = "1.1.8"; 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 frostBallObj; public static GameObject snowBallProjectileObj; public static GameObject snowBallItemObj; public static GameObject snowGunObj; public static GameObject frostMarkObj; public static GameObject snowPileObj; public static GameObject snowmanObj; public static GameObject iceZoneObj; public static EnemyType frostbiteEnemy; public static GameObject snowDecal; public static HashSet<GameObject> snowDecals = new HashSet<GameObject>(); public static Material snowShader; public static GameObject snowParticle; public static GameObject snowmanParticle; public static GameObject frostExplosionParticle; 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(); LoadPrefabs(); LoadNetworkPrefabs(); harmony.PatchAll(typeof(StartOfRoundPatch)); harmony.PatchAll(typeof(RoundManagerPatch)); harmony.PatchAll(typeof(PlayerControllerBPatch)); harmony.PatchAll(typeof(EnemyAIPatch)); ShipInventorySoftCompat.Patch(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() { snowBallItemObj = LFCObjectsManager.RegisterObject(typeof(SnowBallItem), bundle.LoadAsset<Item>("Assets/SnowBall/SP_SnowBallItem.asset")).spawnPrefab; snowGunObj = LFCObjectsManager.RegisterObject(typeof(SnowGun), bundle.LoadAsset<Item>("Assets/SnowGun/SP_SnowGunItem.asset")).spawnPrefab; } 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/SP_Snowman.prefab"), ConfigManager.isSnowmanInside.Value, ConfigManager.minSnowmanInside.Value, ConfigManager.maxSnowmanInside.Value); iceZoneObj = RegisterHazard(bundle.LoadAsset<GameObject>("Assets/IceZone/SP_IceZone.prefab"), ConfigManager.isIceZoneInside.Value, ConfigManager.minIceZoneInside.Value, ConfigManager.maxIceZoneInside.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 LoadPrefabs() { snowDecal = bundle.LoadAsset<GameObject>("Assets/SnowDecal/SP_SnowDecal.prefab"); snowShader = bundle.LoadAsset<Material>("Assets/Shaders/M_Snow.mat"); } public static void LoadNetworkPrefabs() { HashSet<GameObject> hashSet = new HashSet<GameObject> { frostMarkObj = bundle.LoadAsset<GameObject>("Assets/Addons/SP_FrostMark.prefab"), snowParticle = bundle.LoadAsset<GameObject>("Assets/SnowParticle/SP_SnowParticle.prefab"), snowBallProjectileObj = bundle.LoadAsset<GameObject>("Assets/SnowBall/SP_SnowBallProjectile.prefab"), frostBallObj = bundle.LoadAsset<GameObject>("Assets/FrostBall/SP_FrostBall.prefab"), frostExplosionParticle = bundle.LoadAsset<GameObject>("Assets/FrostBall/FrostExplosionParticle.prefab"), snowmanParticle = bundle.LoadAsset<GameObject>("Assets/Snowman/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/SP_JumpscareAudio.prefab") }; foreach (GameObject item in hashSet) { NetworkPrefabs.RegisterNetworkPrefab(item); Utilities.FixMixerGroups(item); } } } public class SPUtilities { [CompilerGenerated] private sealed class <TargetableCoroutine>d__5 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool isTargetable; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <TargetableCoroutine>d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; PlayerControllerBPatch.isTargetable = isTargetable; targetableCoroutine = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static Coroutine targetableCoroutine; public static void 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); val2.GetComponent<NetworkObject>().Spawn(true); } } 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 SpawnIceZone(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_0040: 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.iceZoneObj, ((RaycastHit)(ref val)).point, Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f), RoundManager.Instance.mapPropsContainer.transform); val2.GetComponent<NetworkObject>().Spawn(true); } } public static void SetTargetable(PlayerControllerB player, bool isTargetable) { if (isTargetable) { if (targetableCoroutine != null) { ((MonoBehaviour)player).StopCoroutine(targetableCoroutine); } targetableCoroutine = ((MonoBehaviour)player).StartCoroutine(TargetableCoroutine(isTargetable)); } else { PlayerControllerBPatch.isTargetable = isTargetable; } } [IteratorStateMachine(typeof(<TargetableCoroutine>d__5))] private static IEnumerator TargetableCoroutine(bool isTargetable) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <TargetableCoroutine>d__5(0) { isTargetable = isTargetable }; } 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.snowParticle, 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 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 { public class EnemyAIPatch { [HarmonyPatch(typeof(EnemyAI), "PlayerIsTargetable")] [HarmonyPrefix] public static bool PlayerIsTargetable(ref bool __result) { if (!PlayerControllerBPatch.isTargetable) { return __result = false; } return true; } } public class PlayerControllerBPatch { public static bool isTargetable = true; [HarmonyPatch(typeof(PlayerControllerB), "PlayerLookInput")] [HarmonyPrefix] public static bool HandleSnowmanCamera(PlayerControllerB __instance) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) Snowman snowman = default(Snowman); if (LFCUtilities.ShouldBeLocalPlayer(__instance) && !__instance.quickMenuManager.isMenuOpen && LFCUtilities.TryGetComponentInChildren<Snowman>(((Component)__instance).gameObject, ref snowman)) { MovementActions movement = __instance.playerActions.Movement; Vector2 val = ((MovementActions)(ref movement)).Look.ReadValue<Vector2>() * (float)IngamePlayerSettings.Instance.settings.lookSensitivity * 0.008f; snowman.cameraPivot.Rotate(new Vector3(0f, val.x, 0f)); float num = snowman.cameraPivot.localEulerAngles.x - val.y; num = ((num > 180f) ? (num - 360f) : num); num = Mathf.Clamp(num, -45f, 45f); snowman.cameraPivot.localEulerAngles = new Vector3(num, snowman.cameraPivot.localEulerAngles.y, 0f); return false; } return true; } [HarmonyPatch(typeof(PlayerControllerB), "ItemSecondaryUse_performed")] [HarmonyPostfix] public static void SecondaryUsePerformed(PlayerControllerB __instance) { Snowman snowman = default(Snowman); if (LFCUtilities.ShouldBeLocalPlayer(__instance) && LFCUtilities.TryGetComponentInChildren<Snowman>(((Component)__instance).gameObject, ref snowman) && LFCUtilities.ShouldBeLocalPlayer(snowman?.hidingPlayer)) { snowman.ExitSnowman(); } } [HarmonyPatch(typeof(PlayerControllerB), "DiscardHeldObject")] [HarmonyPrefix] public static bool DiscardHeldObject(PlayerControllerB __instance) { //IL_006b: 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) if (LFCUtilities.ShouldBeLocalPlayer(__instance) && __instance.currentlyHeldObjectServer is SnowBallItem snowBallItem && !((GrabbableObject)snowBallItem).deactivated && snowBallItem.currentStackedItems >= 1) { if (StartOfRound.Instance.shipHasLanded && __instance.isCrouching) { SnowPlaygroundsNetworkManager.Instance.SpawnSnowmanServerRpc((int)__instance.playerClientId, snowBallItem.currentStackedItems); LFCNetworkManager.Instance.DestroyObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)snowBallItem).GetComponent<NetworkObject>())); return false; } snowBallItem.ThrowSnowBallServerRpc(Vector3.down, 1f, 0f); return false; } return true; } [HarmonyPatch(typeof(PlayerControllerB), "DropAllHeldItems")] [HarmonyPrefix] public static void DropAllHeldItems(PlayerControllerB __instance) { if (!LFCUtilities.ShouldBeLocalPlayer(__instance)) { return; } for (int i = 0; i < __instance.ItemSlots.Length; i++) { GrabbableObject val = __instance.ItemSlots[i]; if ((Object)(object)val != (Object)null && val is SnowBallItem snowBallItem && !((GrabbableObject)snowBallItem).deactivated && ((NetworkBehaviour)val).IsSpawned) { __instance.DestroyItemInSlot(i); } } } [HarmonyPatch(typeof(PlayerControllerB), "SetHoverTipAndCurrentInteractTrigger")] [HarmonyPrefix] public 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); Snowman snowman = default(Snowman); 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 && ((Component)((RaycastHit)(ref __instance.hit)).collider).tag.Equals("InteractTrigger") && LFCUtilities.TryGetComponentInParent<Snowman>(((Component)((RaycastHit)(ref __instance.hit)).collider).gameObject, ref snowman)) { __instance.hoveringOverTrigger = snowman.snowmanTrigger; if (!__instance.isHoldingInteract) { ((Behaviour)__instance.cursorIcon).enabled = true; __instance.cursorIcon.sprite = snowman.snowmanTrigger.hoverIcon; ((TMP_Text)__instance.cursorTip).text = snowman.snowmanTrigger.hoverTip; } FormatCursorTip(__instance); return false; } return true; } public 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]"); } } [HarmonyPatch(typeof(PlayerControllerB), "TeleportPlayer")] [HarmonyPostfix] public static void TeleportPlayer(PlayerControllerB __instance) { if (LFCUtilities.ShouldBeLocalPlayer(__instance)) { LFCStatRegistry.ClearModifiersWithTagPrefix("Speed", "Snow PlaygroundsIceZone"); } } [HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")] [HarmonyPostfix] public static void KillPlayer(PlayerControllerB __instance) { if (LFCUtilities.ShouldBeLocalPlayer(__instance)) { LFCStatRegistry.ClearModifiersWithTagPrefix("Speed", "Snow PlaygroundsIceZone"); } } } public class RoundManagerPatch { [HarmonyPatch(typeof(RoundManager), "SpawnMapObjects")] [HarmonyPostfix] public static void SpawnInsideHazards(RoundManager __instance) { if (((NetworkBehaviour)__instance).IsHost) { LFCUtilities.Shuffle<GameObject>((IList<GameObject>)__instance.insideAINodes); } } [HarmonyPatch(typeof(RoundManager), "SpawnOutsideHazards")] [HarmonyPostfix] public static void SpawnOutsideHazards(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()))) { LFCUtilities.Shuffle<GameObject>((IList<GameObject>)__instance.outsideAINodes); if (ConfigManager.isIceZoneOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minIceZoneOutside.Value, ConfigManager.maxIceZoneOutside.Value, (Action<Vector3, Quaternion>)SPUtilities.SpawnIceZone); } if (ConfigManager.isSnowmanOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minSnowmanOutside.Value, ConfigManager.maxSnowmanOutside.Value, (Action<Vector3, Quaternion>)SPUtilities.SpawnSnowman); } if (ConfigManager.isSnowPileOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minSnowPileOutside.Value, ConfigManager.maxSnowPileOutside.Value, (Action<Vector3, Quaternion>)SPUtilities.SpawnSnowPile); } } } [HarmonyPatch(typeof(RoundManager), "GeneratedFloorPostProcessing")] [HarmonyPostfix] public static void AddFakeSnowman(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()))) { Random random = new Random(); List<Snowman> list = (from s in Object.FindObjectsOfType<Snowman>() orderby random.Next() select s).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>())); }); } } } public class StartOfRoundPatch { [HarmonyPatch(typeof(StartOfRound), "Start")] [HarmonyBefore(new string[] { "evaisa.lethallib" })] [HarmonyPostfix] public static void StartRound(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() { ClearSnowmen(); ClearSnowDecals(); } [HarmonyPatch(typeof(StartOfRound), "EndOfGame")] [HarmonyPostfix] public static void EndOfGame() { ClearSnowmen(); ClearSnowDecals(); } public static void ClearSnowmen() { if (!LFCUtilities.IsServer) { return; } Snowman[] array = Object.FindObjectsOfType<Snowman>(); foreach (Snowman snowman in array) { 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); } } } public static void ClearSnowDecals() { SnowPlaygrounds.snowDecals.ToList().ForEach((Action<GameObject>)Object.Destroy); SnowPlaygrounds.snowDecals.Clear(); } [HarmonyPatch(typeof(StartOfRound), "OnDisable")] [HarmonyPostfix] public static void OnDisable() { SnowPlaygroundsNetworkManager.Instance = null; } } } namespace SnowPlaygrounds.ModsCompat { public static class ShipInventorySoftCompat { public static void Patch(Harmony harmony) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown Type type = Type.GetType("ShipInventory.Helpers.ItemManager, ShipInventory"); if (type != null) { MethodInfo methodInfo = AccessTools.Method(type, "StoreItem", (Type[])null, (Type[])null); if (methodInfo != null) { HarmonyMethod val = new HarmonyMethod(AccessTools.Method(typeof(ShipInventorySoftCompat), "StoreItem", (Type[])null, (Type[])null)); harmony.Patch((MethodBase)methodInfo, val, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } public static bool StoreItem(GrabbableObject item) { return !(item is SnowBallItem); } } } namespace SnowPlaygrounds.Managers { public class ConfigManager { public static ConfigEntry<bool> anyLevel; public static ConfigEntry<string> spawnLevels; public static ConfigEntry<string> spawnWeathers; 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<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<bool> frostbiteDefaultHit; public static ConfigEntry<int> snowGunAmount; public static ConfigEntry<int> frostMarkCooldown; public static ConfigEntry<bool> isIceZoneInside; public static ConfigEntry<int> minIceZoneInside; public static ConfigEntry<int> maxIceZoneInside; public static ConfigEntry<bool> isIceZoneOutside; public static ConfigEntry<int> minIceZoneOutside; public static ConfigEntry<int> maxIceZoneOutside; public static ConfigEntry<float> iceZonePlayerSpeed; public static ConfigEntry<float> iceZoneEnemySpeed; 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"); 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"); 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"); frostbiteDefaultHit = SnowPlaygrounds.configFile.Bind<bool>("Frostbite", "Default hit", false, "Allow hitting Frostbite with conventional means"); snowGunAmount = SnowPlaygrounds.configFile.Bind<int>("Snowgun", "Amount", 20, "Amount of snow in a Snowgun"); frostMarkCooldown = SnowPlaygrounds.configFile.Bind<int>("Addons", "Frost Mark Cooldown", 45, "Cooldown duration of the Frost Mark"); isIceZoneInside = SnowPlaygrounds.configFile.Bind<bool>("Ice Zone", "Can spawn inside", true, "Can Ice Zone spawn inside"); minIceZoneInside = SnowPlaygrounds.configFile.Bind<int>("Ice Zone", "Min spawn inside", 2, "Min Ice Zone to spawn"); maxIceZoneInside = SnowPlaygrounds.configFile.Bind<int>("Ice Zone", "Max spawn inside", 3, "Max Ice Zone to spawn"); isIceZoneOutside = SnowPlaygrounds.configFile.Bind<bool>("Ice Zone", "Can spawn outside", true, "Can Ice Zone spawn outside"); minIceZoneOutside = SnowPlaygrounds.configFile.Bind<int>("Ice Zone", "Min spawn outside", 2, "Min Ice Zone to spawn"); maxIceZoneOutside = SnowPlaygrounds.configFile.Bind<int>("Ice Zone", "Max spawn outside", 3, "Max Ice Zone to spawn"); iceZonePlayerSpeed = SnowPlaygrounds.configFile.Bind<float>("Ice Zone", "Player speed", -0.6f, "Player speed reduction on Ice Zone"); iceZoneEnemySpeed = SnowPlaygrounds.configFile.Bind<float>("Ice Zone", "Enemy speed", 0.5f, "Enemy speed boost on Ice Zone"); } } public class SnowPlaygroundsNetworkManager : NetworkBehaviour { public static SnowPlaygroundsNetworkManager Instance; public void Awake() { Instance = this; } [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 ThrowFrostBallServerRpc(int playerId, Vector3 position, Vector3 direction) { //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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_0108: 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(1667003156u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref direction); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1667003156u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((Vector3)(ref direction)).sqrMagnitude < 0.5f) { direction = ((Component)StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>()).transform.forward; } direction = ((Vector3)(ref direction)).normalized; GameObject val4 = Object.Instantiate<GameObject>(SnowPlaygrounds.frostBallObj, position, Quaternion.identity); val4.GetComponent<NetworkObject>().Spawn(false); ((LFCBouncyAoEProjectile)val4.GetComponent<FrostBall>()).ThrowFromPlayerEveryoneRpc(playerId, position, direction); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnSnowmanServerRpc(int playerId, 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_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) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: 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(3022986215u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); BytePacker.WriteValueBitPacked(val3, nbSnowBall); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3022986215u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); Vector3 val4 = ((Component)component.gameplayCamera).transform.position + ((Component)component.gameplayCamera).transform.forward; RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val4, Vector3.down, ref val5, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { GameObject snowmanObj = SnowPlaygrounds.snowmanObj; Vector3 point = ((RaycastHit)(ref val5)).point; Quaternion rotation = ((Component)component).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = ((Component)component).transform.rotation; GameObject val6 = Object.Instantiate<GameObject>(snowmanObj, point, Quaternion.Euler(0f, y, ((Quaternion)(ref rotation)).eulerAngles.z), RoundManager.Instance.mapPropsContainer.transform); val6.transform.localScale = ((nbSnowBall >= ConfigManager.amountSnowBallToBuild.Value) ? Constants.SNOWMAN_SCALE : (Constants.SNOWMAN_SCALE / (float)ConfigManager.amountSnowBallToBuild.Value * (float)nbSnowBall)); NetworkObject component2 = val6.GetComponent<NetworkObject>(); component2.Spawn(true); SpawnSnowmanEveryoneRpc((int)component.playerClientId, NetworkObjectReference.op_Implicit(component2), nbSnowBall); } } } [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) 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) { 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.currentStackedSnowBall = nbSnowBall; componentInChildren.RefreshHoverTip(); LFCMapObjectsManager.AttachMapObjectForEveryone(StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(), ((Component)componentInChildren).gameObject); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnFrostMarkEveryoneRpc(int playerId, int playerWhoHit) { //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) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) 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(2210119572u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); BytePacker.WriteValueBitPacked(val3, playerWhoHit); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2210119572u, 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>(); LFCGlobalManager.PlayParticle(SnowPlaygrounds.frostMarkObj, ((Component)component).transform.position, ((Component)component).transform.rotation, true, 1f, true); LSStatusEffectRegistry.ApplyStatus(((Component)component).gameObject, (StatusEffectType)1, playerWhoHit, 10, 100, (EnemyAI)null, (Action)null, (Action)null, (Action)null); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnFrostMarkEveryoneRpc(NetworkObjectReference obj, int playerWhoHit) { //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_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_0091: 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) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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(3961219628u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val3, playerWhoHit); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3961219628u, 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)) { EnemyAI component = ((Component)val4).gameObject.GetComponent<EnemyAI>(); Bounds bounds = ((Collider)((Component)component).GetComponentInChildren<BoxCollider>()).bounds; Vector3 size = ((Bounds)(ref bounds)).size; LFCGlobalManager.PlayParticle(SnowPlaygrounds.frostMarkObj, ((Component)component).transform.position, ((Component)component).transform.rotation, false, Mathf.Max(new float[3] { size.x, size.y, size.z }) / 2f, true); LSStatusEffectRegistry.ApplyStatus(((Component)component).gameObject, (StatusEffectType)1, playerWhoHit, 10, 100, (EnemyAI)null, (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 ((NetworkBehaviour)this).__registerRpc(1142987429u, new RpcReceiveHandler(__rpc_handler_1142987429), "AddFakeSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1667003156u, new RpcReceiveHandler(__rpc_handler_1667003156), "ThrowFrostBallServerRpc"); ((NetworkBehaviour)this).__registerRpc(3022986215u, new RpcReceiveHandler(__rpc_handler_3022986215), "SpawnSnowmanServerRpc"); ((NetworkBehaviour)this).__registerRpc(1368642794u, new RpcReceiveHandler(__rpc_handler_1368642794), "SpawnSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2210119572u, new RpcReceiveHandler(__rpc_handler_2210119572), "SpawnFrostMarkEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3961219628u, new RpcReceiveHandler(__rpc_handler_3961219628), "SpawnFrostMarkEveryoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } 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_1667003156(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); Vector3 direction = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref direction); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).ThrowFrostBallServerRpc(playerId, position, direction); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3022986215(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 nbSnowBall = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SpawnSnowmanServerRpc(playerId, nbSnowBall); 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_2210119572(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 playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SpawnFrostMarkEveryoneRpc(playerId, playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3961219628(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_003e: 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_005c: 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) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); int playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPlaygroundsNetworkManager)(object)target).SpawnFrostMarkEveryoneRpc(obj, playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowPlaygroundsNetworkManager"; } } } namespace SnowPlaygrounds.Behaviours.MapObjects { public class IceZone : NetworkBehaviour { [CompilerGenerated] private sealed class <GroundCheckCoroutine>d__19 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerControllerB player; public IceZone <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GroundCheckCoroutine>d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown int num = <>1__state; IceZone iceZone = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; player.sprintMeter = 0f; player.sprintMeterUI.fillAmount = player.sprintMeter; <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; iceZone.wasGrounded = true; iceZone.groundCheckCoroutine = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool hasLastPosition; private Vector3 lastPosition; private Vector3 slideVelocity; public float slideInertia = 5f; public float slideFriction = 0.99f; public float maxSlideSpeed = 5f; public float forwardBoost = 2f; public float reverseSteerFactor = 0.03f; public float slipStrength = 4f; public float minSpeedToSlip = 0.2f; public float driftFrequency = 1.2f; private bool wasGrounded; private Coroutine groundCheckCoroutine; private readonly Dictionary<ulong, int> entityOverlapCount = new Dictionary<ulong, int>(); private void OnTriggerStay(Collider collider) { if (!((Object)(object)collider != (Object)null)) { return; } EnemyAICollisionDetect val = default(EnemyAICollisionDetect); PlayerControllerB val2 = default(PlayerControllerB); if (LFCUtilities.IsServer && ((Component)collider).TryGetComponent<EnemyAICollisionDetect>(ref val) && (Object)(object)val.mainScript != (Object)null) { if (AddEntityIce(((NetworkBehaviour)val.mainScript).NetworkObjectId)) { LFCEnemySpeedBehaviour component = ((Component)val.mainScript).GetComponent<LFCEnemySpeedBehaviour>(); if (component != null) { component.AddSpeedData("Snow PlaygroundsIceZone", ConfigManager.iceZoneEnemySpeed.Value, val.mainScript.agent.speed); } } } else if (((Component)collider).TryGetComponent<PlayerControllerB>(ref val2) && LFCUtilities.ShouldBeLocalPlayer(val2)) { ApplyPlayerIce(val2); } } private void OnTriggerExit(Collider collider) { if (!((Object)(object)collider != (Object)null)) { return; } EnemyAICollisionDetect collisionDetect = default(EnemyAICollisionDetect); PlayerControllerB val = default(PlayerControllerB); if (LFCUtilities.IsServer && ((Component)collider).TryGetComponent<EnemyAICollisionDetect>(ref collisionDetect) && (Object)(object)collisionDetect.mainScript != (Object)null) { RemoveEntityIce(((NetworkBehaviour)collisionDetect.mainScript).NetworkObjectId, delegate { LFCEnemySpeedBehaviour component = ((Component)collisionDetect.mainScript).GetComponent<LFCEnemySpeedBehaviour>(); if (component != null) { component.RemoveSpeedData("Snow PlaygroundsIceZone"); } }); } else if (((Component)collider).TryGetComponent<PlayerControllerB>(ref val) && LFCUtilities.ShouldBeLocalPlayer(val)) { RemoveEntityIce(val.playerClientId, delegate { //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) LFCStatRegistry.RemoveModifier("Speed", string.Format("{0}IceZone{1}", "Snow Playgrounds", ((Object)this).GetInstanceID())); hasLastPosition = false; slideVelocity = Vector3.zero; }); } } private bool AddEntityIce(ulong id) { entityOverlapCount.TryGetValue(id, out var value); value++; entityOverlapCount[id] = value; return value == 1; } private void RemoveEntityIce(ulong id, Action removeEntityIce) { if (entityOverlapCount.TryGetValue(id, out var value)) { value--; if (value <= 0) { entityOverlapCount.Remove(id); removeEntityIce(); } else { entityOverlapCount[id] = value; } } } private void ApplyPlayerIce(PlayerControllerB player) { //IL_00ec: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) float deltaTime = Time.deltaTime; if (deltaTime <= 0f || groundCheckCoroutine != null) { return; } int instanceID = ((Object)this).GetInstanceID(); if (!LFCStatRegistry.HasModifier("Speed", string.Format("{0}IceZone{1}", "Snow Playgrounds", instanceID))) { if (AddEntityIce(player.playerClientId) && !LFCStatRegistry.HasModifierWithTagPrefix("Speed", "Snow PlaygroundsIceZone")) { LFCStatRegistry.AddModifier("Speed", string.Format("{0}IceZone{1}", "Snow Playgrounds", instanceID), ConfigManager.iceZonePlayerSpeed.Value); wasGrounded = player.thisController.isGrounded; hasLastPosition = false; slideVelocity = Vector3.zero; } return; } if (!wasGrounded && player.thisController.isGrounded) { groundCheckCoroutine = ((MonoBehaviour)this).StartCoroutine(GroundCheckCoroutine(player)); return; } wasGrounded = player.thisController.isGrounded; Vector3 position = ((Component)player).transform.position; if (!hasLastPosition) { hasLastPosition = true; lastPosition = position; return; } Vector3 val = (position - lastPosition) / deltaTime; lastPosition = position; Vector3 val2 = val - slideVelocity; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(val2.x, 0f, val2.z); if (((Vector3)(ref val3)).sqrMagnitude < minSpeedToSlip * minSpeedToSlip) { slideVelocity *= Mathf.Pow(slideFriction, deltaTime * 60f); slideVelocity.y = 0f; if (!LFCPlayerActionRegistry.IsLocked("Move")) { player.thisController.Move(slideVelocity * deltaTime); } return; } Vector3 normalized = ((Vector3)(ref val3)).normalized; Vector3 val4 = Vector3.Cross(Vector3.up, normalized); Vector3 normalized2 = ((Vector3)(ref val4)).normalized; float num = Mathf.Sin(Time.time * (2f + driftFrequency) + (float)(int)player.playerClientId * 0.01f); float num2 = Mathf.Min(maxSlideSpeed, ((Vector3)(ref val3)).magnitude + forwardBoost); Vector3 val5 = normalized * num2 + normalized2 * (num * slipStrength); float num3 = 1f; Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(slideVelocity.x, 0f, slideVelocity.z); Vector3 val7 = default(Vector3); ((Vector3)(ref val7))..ctor(val5.x, 0f, val5.z); if (((Vector3)(ref val6)).sqrMagnitude > 0.0001f && ((Vector3)(ref val7)).sqrMagnitude > 0.0001f) { num3 = Vector3.Dot(((Vector3)(ref val6)).normalized, ((Vector3)(ref val7)).normalized); } float num4 = Mathf.Lerp(reverseSteerFactor, 1f, Mathf.InverseLerp(-0.2f, 0.8f, num3)); float num5 = (1f - Mathf.Exp((0f - slideInertia) * deltaTime)) * num4; slideVelocity = Vector3.Lerp(slideVelocity, val5, num5); slideVelocity *= Mathf.Pow(slideFriction, deltaTime * 60f); slideVelocity.y = 0f; if (!LFCPlayerActionRegistry.IsLocked("Move")) { player.thisController.Move(slideVelocity * deltaTime); } } [IteratorStateMachine(typeof(<GroundCheckCoroutine>d__19))] private IEnumerator GroundCheckCoroutine(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GroundCheckCoroutine>d__19(0) { <>4__this = this, player = player }; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "IceZone"; } } 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 (LFCUtilities.ShouldBeLocalPlayer(component)) { 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; if (!LFCUtilities.ShouldBeLocalPlayer(localPlayerController)) { return; } int num = 0; for (int i = 0; i < localPlayerController.ItemSlots.Length; i++) { GrabbableObject val = localPlayerController.ItemSlots[i]; if ((Object)(object)val != (Object)null && val is SnowBallItem snowBallItem) { num += snowBallItem.currentStackedItems; localPlayerController.DestroyItemInSlotAndSync(i); } } if (num > 0) { BuildSnowmanEveryoneRpc(num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void BuildSnowmanEveryoneRpc(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_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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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(2414602180u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, nbSnowBall); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2414602180u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; currentStackedSnowBall += nbSnowBall; ((Component)this).gameObject.transform.localScale = ((currentStackedSnowBall >= ConfigManager.amountSnowBallToBuild.Value) ? Constants.SNOWMAN_SCALE : (Constants.SNOWMAN_SCALE / (float)ConfigManager.amountSnowBallToBuild.Value * (float)currentStackedSnowBall)); RefreshHoverTip(); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void EnterSnowmanEveryoneRpc(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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) 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(913681031u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 913681031u, 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>(); component.DropAllHeldItems(true, false, false, false, default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3)); snowmanTrigger.interactable = false; isPlayerHiding = true; hidingPlayer = component; ((Component)this).transform.SetParent(((Component)component).transform); ((Component)this).transform.position = ((Component)component).transform.position; ((Component)this).transform.rotation = ((Component)component).transform.rotation; if (LFCUtilities.ShouldBeLocalPlayer(component)) { ((Behaviour)camera).enabled = true; component.gameplayCamera = camera; SPUtilities.SetTargetable(component, isTargetable: false); HUDManager.Instance.ChangeControlTip(0, "Exit Snowman : [Q]", true); LFCPlayerActionRegistry.AddLock("Move", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); LFCPlayerActionRegistry.AddLock("Jump", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); LFCPlayerActionRegistry.AddLock("Crouch", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); } } } public void ExitSnowman() { ExitSnowmanEveryoneRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] public void ExitSnowmanEveryoneRpc(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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams {
SnowPlaygroundsAddon.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddonFusion; using AddonFusion.Behaviours.AddonComponents; using AddonFusion.Behaviours.AddonProps; using AddonFusion.Behaviours.Scripts; using AddonFusion.Registries; using BepInEx; using GameNetcodeStuff; using HarmonyLib; using LegaFusionCore.Managers; using LegaFusionCore.Utilities; using LethalLib.Modules; using Microsoft.CodeAnalysis; using SnowPlaygrounds.Behaviours.Items; using SnowPlaygrounds.Managers; using SnowPlaygroundsAddon.Behaviours.AddonComponents; using SnowPlaygroundsAddon.Behaviours.AddonProps; using SnowPlaygroundsAddon.NetcodePatcher; using SnowPlaygroundsAddon.Patches; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("SnowPlaygroundsAddon")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SnowPlaygroundsAddon")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("76098164-181b-4373-ad67-b98732cfd358")] [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("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: 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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SnowPlaygroundsAddon { [BepInPlugin("Lega.SnowPlaygroundsAddon", "Snow Playgrounds Addon", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class SnowPlaygroundsAddon : BaseUnityPlugin { public const string modGUID = "Lega.SnowPlaygroundsAddon"; public const string modName = "Snow Playgrounds Addon"; public const string modVersion = "1.0.0"; private readonly Harmony harmony = new Harmony("Lega.SnowPlaygroundsAddon"); private static readonly AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "snowplaygroundsaddon")); public static GameObject frostProjectorObj; public void Awake() { LoadItems(); LoadPrefabs(); harmony.PatchAll(typeof(SnowGunPatch)); } public void LoadItems() { RegisterAddon(typeof(FrostMark), "Frost Mark", typeof(FrostMarkItem), bundle.LoadAsset<Item>("Assets/AddonProps/FrostMarkItem.asset")); } public void RegisterAddon(Type addonType, string addonName, Type itemType, Item item) { item = LFCObjectsManager.RegisterObject(itemType, item); AddonObjectRegistry.Add(addonType, addonName, item.spawnPrefab); } public void LoadPrefabs() { HashSet<GameObject> hashSet = new HashSet<GameObject> { frostProjectorObj = bundle.LoadAsset<GameObject>("Assets/AoEProjector/FrostProjector.prefab") }; foreach (GameObject item in hashSet) { Utilities.FixMixerGroups(item); } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "SnowPlaygroundsAddon"; public const string PLUGIN_NAME = "SnowPlaygroundsAddon"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace SnowPlaygroundsAddon.Patches { public class SnowGunPatch { [HarmonyPatch(typeof(SnowGun), "InitializeEveryoneRpc")] [HarmonyPostfix] public static void InitializeForEveryone(SnowGun __instance) { AFUtilities.SetAddonComponent<FrostMark>((GrabbableObject)(object)__instance); } [HarmonyPatch(typeof(SnowGun), "SetControlTipsForItem")] [HarmonyPostfix] public static void SetControlTipsForAddon(SnowGun __instance) { AFUtilities.SetControlTipsForAddon((GrabbableObject)(object)__instance); } } } namespace SnowPlaygroundsAddon.Behaviours.AddonProps { public class FrostMarkItem : AddonScroll { public override Type AddonType => typeof(FrostMark); protected override void __initializeVariables() { ((AddonScroll)this).__initializeVariables(); } protected override void __initializeRpcs() { ((AddonScroll)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FrostMarkItem"; } } } namespace SnowPlaygroundsAddon.Behaviours.AddonComponents { [AddonInfo(/*Could not decode attribute arguments.*/)] public class FrostMark : AddonComponent { private readonly Collider[] overlapBuffer = (Collider[])(object)new Collider[64]; public readonly float AoERadius = 1f; public readonly int AoEMask = 1084754248; public AoEProjector frostProjector; public override string AddonName => "Frost Mark"; public override bool IsPassive => false; public override void ActivateAddonAbility() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) if (base.onCooldown || !StartOfRound.Instance.shipHasLanded || !((Object)(object)base.grabbableObject.playerHeldBy != (Object)null)) { return; } base.isEnabled = !base.isEnabled; if (base.isEnabled) { GameObject val = Object.Instantiate<GameObject>(SnowPlaygroundsAddon.frostProjectorObj, ((Component)base.grabbableObject.playerHeldBy).transform.position, Quaternion.identity); frostProjector = val.GetComponent<AoEProjector>(); } else { if (!((Object)(object)frostProjector != (Object)null)) { return; } Vector3 val2 = default(Vector3); if (frostProjector.TryConfirm(ref val2)) { int num = Physics.OverlapSphereNonAlloc(val2, AoERadius, overlapBuffer, AoEMask, (QueryTriggerInteraction)2); PlayerControllerB val4 = default(PlayerControllerB); EnemyAICollisionDetect val5 = default(EnemyAICollisionDetect); for (int i = 0; i < num; i++) { Collider val3 = overlapBuffer[i]; if ((Object)(object)val3 != (Object)null) { if (((Component)val3).gameObject.TryGetComponent<PlayerControllerB>(ref val4) && !val4.isPlayerDead && LFCUtilities.ShouldNotBeLocalPlayer(val4)) { SnowPlaygroundsNetworkManager.Instance.SpawnFrostMarkEveryoneRpc((int)val4.playerClientId, (int)LFCUtilities.LocalPlayer.playerClientId); } if (((Component)val3).gameObject.TryGetComponent<EnemyAICollisionDetect>(ref val5) && (Object)(object)val5.mainScript != (Object)null && !val5.mainScript.isEnemyDead) { SnowPlaygroundsNetworkManager.Instance.SpawnFrostMarkEveryoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)val5.mainScript).NetworkObject), (int)LFCUtilities.LocalPlayer.playerClientId); } } } } Object.Destroy((Object)(object)((Component)frostProjector).gameObject); ((AddonComponent)this).StartCooldown(ConfigManager.frostMarkCooldown.Value); } } public void Update() { if (base.isEnabled && ((Object)(object)base.grabbableObject == (Object)null || !base.grabbableObject.isHeld || base.grabbableObject.isPocketed) && (Object)(object)frostProjector != (Object)null) { base.isEnabled = false; Object.Destroy((Object)(object)((Component)frostProjector).gameObject); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace SnowPlaygroundsAddon.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }