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 snowDecals = new HashSet(); 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(); } 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("Assets/SnowBall/SP_SnowBallItem.asset")).spawnPrefab; snowGunObj = LFCObjectsManager.RegisterObject(typeof(SnowGun), bundle.LoadAsset("Assets/SnowGun/SP_SnowGunItem.asset")).spawnPrefab; } public void LoadHazards() { snowPileObj = RegisterHazard(bundle.LoadAsset("Assets/SnowPile/SP_SnowPile.prefab"), ConfigManager.isSnowPileInside.Value, ConfigManager.minSnowPileInside.Value, ConfigManager.maxSnowPileInside.Value); snowmanObj = RegisterHazard(bundle.LoadAsset("Assets/Snowman/SP_Snowman.prefab"), ConfigManager.isSnowmanInside.Value, ConfigManager.minSnowmanInside.Value, ConfigManager.maxSnowmanInside.Value); iceZoneObj = RegisterHazard(bundle.LoadAsset("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(); 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 _) => animationCurveInside)); } else { MapObjects.RegisterMapObject(val, (LevelTypes)1, ConfigManager.spawnLevels.Value.ToLowerInvariant().Split(','), (Func)((SelectableLevel _) => animationCurveInside)); } } return val.spawnableMapObject.prefabToSpawn; } public static void LoadEnemies() { frostbiteEnemy = bundle.LoadAsset("Assets/Frostbite/SP_FrostbiteEnemy.asset"); NetworkPrefabs.RegisterNetworkPrefab(frostbiteEnemy.enemyPrefab); TerminalNode val = bundle.LoadAsset("Assets/Frostbite/SP_FrostbiteTN.asset"); TerminalKeyword val2 = bundle.LoadAsset("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("Assets/SnowDecal/SP_SnowDecal.prefab"); snowShader = bundle.LoadAsset("Assets/Shaders/M_Snow.mat"); } public static void LoadNetworkPrefabs() { HashSet hashSet = new HashSet { frostMarkObj = bundle.LoadAsset("Assets/Addons/SP_FrostMark.prefab"), snowParticle = bundle.LoadAsset("Assets/SnowParticle/SP_SnowParticle.prefab"), snowBallProjectileObj = bundle.LoadAsset("Assets/SnowBall/SP_SnowBallProjectile.prefab"), frostBallObj = bundle.LoadAsset("Assets/FrostBall/SP_FrostBall.prefab"), frostExplosionParticle = bundle.LoadAsset("Assets/FrostBall/FrostExplosionParticle.prefab"), snowmanParticle = bundle.LoadAsset("Assets/Snowman/SP_SnowmanParticle.prefab"), snowPoofAudio = bundle.LoadAsset("Assets/SFX/Prefabs/SP_SnowPoofAudio.prefab"), snowShootAudio = bundle.LoadAsset("Assets/SFX/Prefabs/SP_SnowShootAudio.prefab"), jumpscareAudio = bundle.LoadAsset("Assets/Snowman/SP_JumpscareAudio.prefab") }; foreach (GameObject item in hashSet) { NetworkPrefabs.RegisterNetworkPrefab(item); Utilities.FixMixerGroups(item); } } } public class SPUtilities { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool isTargetable; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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(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().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(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().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(SnowPlaygrounds.iceZoneObj, ((RaycastHit)(ref val)).point, Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f), RoundManager.Instance.mapPropsContainer.transform); val2.GetComponent().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(d__5))] private static IEnumerator TargetableCoroutine(bool isTargetable) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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(SnowPlaygrounds.snowParticle, position, rotation); ParticleSystem component = val.GetComponent(); 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(SnowPlaygrounds.snowmanParticle, position, rotation); ParticleSystem component = val.GetComponent(); 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(audioPrefab, position, Quaternion.identity); AudioSource component = val.GetComponent(); 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(((Component)__instance).gameObject, ref snowman)) { MovementActions movement = __instance.playerActions.Movement; Vector2 val = ((MovementActions)(ref movement)).Look.ReadValue() * (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(((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())); 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(((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((IList)__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((IList)__instance.outsideAINodes); if (ConfigManager.isIceZoneOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minIceZoneOutside.Value, ConfigManager.maxIceZoneOutside.Value, (Action)SPUtilities.SpawnIceZone); } if (ConfigManager.isSnowmanOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minSnowmanOutside.Value, ConfigManager.maxSnowmanOutside.Value, (Action)SPUtilities.SpawnSnowman); } if (ConfigManager.isSnowPileOutside.Value) { LFCMapObjectsManager.SpawnOutsideMapObjectsForServer(ConfigManager.minSnowPileOutside.Value, ConfigManager.maxSnowPileOutside.Value, (Action)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 list = (from s in Object.FindObjectsOfType() 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())); }); } } } 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(SnowPlaygrounds.managerPrefab, ((Component)__instance).transform.parent); val.GetComponent().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(); 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(); if ((Object)(object)component != (Object)null && component.IsSpawned) { component.Despawn(true); } } } public static void ClearSnowDecals() { SnowPlaygrounds.snowDecals.ToList().ForEach((Action)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 anyLevel; public static ConfigEntry spawnLevels; public static ConfigEntry spawnWeathers; public static ConfigEntry snowPileAmount; public static ConfigEntry isSnowPileInside; public static ConfigEntry minSnowPileInside; public static ConfigEntry maxSnowPileInside; public static ConfigEntry isSnowPileOutside; public static ConfigEntry minSnowPileOutside; public static ConfigEntry maxSnowPileOutside; public static ConfigEntry snowBallAmount; public static ConfigEntry snowBallPushForce; public static ConfigEntry snowBallSlowdownDuration; public static ConfigEntry snowBallSlowdownFactor; public static ConfigEntry snowBallThrowCooldown; public static ConfigEntry isSnowmanInside; public static ConfigEntry minSnowmanInside; public static ConfigEntry maxSnowmanInside; public static ConfigEntry isSnowmanOutside; public static ConfigEntry minSnowmanOutside; public static ConfigEntry maxSnowmanOutside; public static ConfigEntry amountSnowBallToBuild; public static ConfigEntry isJumpscareOn; public static ConfigEntry jumpscareVolume; public static ConfigEntry minFakeSnowman; public static ConfigEntry maxFakeSnowman; public static ConfigEntry frostbiteRarity; public static ConfigEntry frostbiteEating; public static ConfigEntry frostbiteDamage; public static ConfigEntry frostbiteDefaultHit; public static ConfigEntry snowGunAmount; public static ConfigEntry frostMarkCooldown; public static ConfigEntry isIceZoneInside; public static ConfigEntry minIceZoneInside; public static ConfigEntry maxIceZoneInside; public static ConfigEntry isIceZoneOutside; public static ConfigEntry minIceZoneOutside; public static ConfigEntry maxIceZoneOutside; public static ConfigEntry iceZonePlayerSpeed; public static ConfigEntry iceZoneEnemySpeed; public static void Load() { anyLevel = SnowPlaygrounds.configFile.Bind("_Global_", "Any level", true, "If true, the hazards can spawn on any level"); spawnLevels = SnowPlaygrounds.configFile.Bind("_Global_", "Spawn levels", "tundralevel,titanlevel,dinelevel,rendlevel", "Name of the levels where the hazards can spawn"); spawnWeathers = SnowPlaygrounds.configFile.Bind("_Global_", "Spawn weathers", "Blizzard,Snowfall", "Name of the weathers where the hazards can spawn"); snowPileAmount = SnowPlaygrounds.configFile.Bind("Snow Pile", "Amount", 20, "Amount of snow in a Snow Pile"); isSnowPileInside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Can spawn inside", true, "Can Snow Pile spawn inside"); minSnowPileInside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Min spawn inside", 5, "Min Snow Pile to spawn"); maxSnowPileInside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Max spawn inside", 8, "Max Snow Pile to spawn"); isSnowPileOutside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Can spawn outside", true, "Can Snow Pile spawn outside"); minSnowPileOutside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Min spawn outside", 2, "Min Snow Pile to spawn"); maxSnowPileOutside = SnowPlaygrounds.configFile.Bind("Snow Pile", "Max spawn outside", 4, "Max Snow Pile to spawn"); snowBallAmount = SnowPlaygrounds.configFile.Bind("Snowball", "Amount", 5, "Amount of Snowball per slot"); snowBallPushForce = SnowPlaygrounds.configFile.Bind("Snowball", "Push force", 1f, "Push force applied to target player"); snowBallSlowdownDuration = SnowPlaygrounds.configFile.Bind("Snowball", "Slowdown duration", 1f, "Slowdown duration applied to targeted enemy"); snowBallSlowdownFactor = SnowPlaygrounds.configFile.Bind("Snowball", "Slowdown factor", 3f, "Slowdown factor applied to targeted enemy"); snowBallThrowCooldown = SnowPlaygrounds.configFile.Bind("Snowball", "Throw cooldown", 1f, "Snowball throw cooldown"); isSnowmanInside = SnowPlaygrounds.configFile.Bind("Snowman", "Can spawn inside", true, "Can Snowman spawn inside"); minSnowmanInside = SnowPlaygrounds.configFile.Bind("Snowman", "Min spawn inside", 2, "Min Snowman to spawn"); maxSnowmanInside = SnowPlaygrounds.configFile.Bind("Snowman", "Max spawn inside", 3, "Max Snowman to spawn"); isSnowmanOutside = SnowPlaygrounds.configFile.Bind("Snowman", "Can spawn outside", true, "Can Snowman spawn outside"); minSnowmanOutside = SnowPlaygrounds.configFile.Bind("Snowman", "Min spawn outside", 2, "Min Snowman to spawn"); maxSnowmanOutside = SnowPlaygrounds.configFile.Bind("Snowman", "Max spawn outside", 3, "Max Snowman to spawn"); amountSnowBallToBuild = SnowPlaygrounds.configFile.Bind("Snowman", "Amount snowball", 20, "Amout of Snowball required to build a Snowman"); isJumpscareOn = SnowPlaygrounds.configFile.Bind("Fake Snowman", "Enable jumpscare", true, "Enable jumpscare audio"); jumpscareVolume = SnowPlaygrounds.configFile.Bind("Fake Snowman", "Jumpscare volume", 0.5f, "Jumpscare audio volume"); minFakeSnowman = SnowPlaygrounds.configFile.Bind("Fake Snowman", "Min spawn", 1, "Min Fake Snowman to spawn by default"); maxFakeSnowman = SnowPlaygrounds.configFile.Bind("Fake Snowman", "Max spawn", 2, "Max Fake Snowman to spawn by default"); frostbiteRarity = SnowPlaygrounds.configFile.Bind("Frostbite", "Rarity", 10, "Frostbite rarity"); frostbiteEating = SnowPlaygrounds.configFile.Bind("Frostbite", "Eat the player?", true, "Does Frostbite eat the player on collision?"); frostbiteDamage = SnowPlaygrounds.configFile.Bind("Frostbite", "Damage", 20, "Frostbite damages on collision, does not apply if 'Eat the player?' is true"); frostbiteDefaultHit = SnowPlaygrounds.configFile.Bind("Frostbite", "Default hit", false, "Allow hitting Frostbite with conventional means"); snowGunAmount = SnowPlaygrounds.configFile.Bind("Snowgun", "Amount", 20, "Amount of snow in a Snowgun"); frostMarkCooldown = SnowPlaygrounds.configFile.Bind("Addons", "Frost Mark Cooldown", 45, "Cooldown duration of the Frost Mark"); isIceZoneInside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Can spawn inside", true, "Can Ice Zone spawn inside"); minIceZoneInside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Min spawn inside", 2, "Min Ice Zone to spawn"); maxIceZoneInside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Max spawn inside", 3, "Max Ice Zone to spawn"); isIceZoneOutside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Can spawn outside", true, "Can Ice Zone spawn outside"); minIceZoneOutside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Min spawn outside", 2, "Min Ice Zone to spawn"); maxIceZoneOutside = SnowPlaygrounds.configFile.Bind("Ice Zone", "Max spawn outside", 3, "Max Ice Zone to spawn"); iceZonePlayerSpeed = SnowPlaygrounds.configFile.Bind("Ice Zone", "Player speed", -0.6f, "Player speed reduction on Ice Zone"); iceZoneEnemySpeed = SnowPlaygrounds.configFile.Bind("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(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(); 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()).transform.forward; } direction = ((Vector3)(ref direction)).normalized; GameObject val4 = Object.Instantiate(SnowPlaygrounds.frostBallObj, position, Quaternion.identity); val4.GetComponent().Spawn(false); ((LFCBouncyAoEProjectile)val4.GetComponent()).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(); 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(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(); 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(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(); componentInChildren.currentStackedSnowBall = nbSnowBall; componentInChildren.RefreshHoverTip(); LFCMapObjectsManager.AttachMapObjectForEveryone(StartOfRound.Instance.allPlayerObjects[playerId].GetComponent(), ((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(); 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(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(); Bounds bounds = ((Collider)((Component)component).GetComponentInChildren()).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(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(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(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 d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerControllerB player; public IceZone <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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 entityOverlapCount = new Dictionary(); 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(ref val) && (Object)(object)val.mainScript != (Object)null) { if (AddEntityIce(((NetworkBehaviour)val.mainScript).NetworkObjectId)) { LFCEnemySpeedBehaviour component = ((Component)val.mainScript).GetComponent(); if (component != null) { component.AddSpeedData("Snow PlaygroundsIceZone", ConfigManager.iceZoneEnemySpeed.Value, val.mainScript.agent.speed); } } } else if (((Component)collider).TryGetComponent(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(ref collisionDetect) && (Object)(object)collisionDetect.mainScript != (Object)null) { RemoveEntityIce(((NetworkBehaviour)collisionDetect.mainScript).NetworkObjectId, delegate { LFCEnemySpeedBehaviour component = ((Component)collisionDetect.mainScript).GetComponent(); if (component != null) { component.RemoveSpeedData("Snow PlaygroundsIceZone"); } }); } else if (((Component)collider).TryGetComponent(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(d__19))] private IEnumerator GroundCheckCoroutine(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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(); 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(SnowPlaygrounds.frostbiteEnemy.enemyPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val4.GetComponentInChildren().Spawn(true); ((EnemyAI)val4.GetComponent()).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(); 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 { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(668333629u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 668333629u, 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(); ((Component)this).transform.SetParent((Transform)null); if (LFCUtilities.ShouldBeLocalPlayer(component)) { ((Behaviour)camera).enabled = false; component.gameplayCamera = playerCamera; HUDManager.Instance.ClearControlTips(); LFCPlayerActionRegistry.RemoveLock("Move", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); LFCPlayerActionRegistry.RemoveLock("Jump", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); LFCPlayerActionRegistry.RemoveLock("Crouch", "Snow Playgrounds" + ((Object)((Component)this).gameObject).name); SPUtilities.SetTargetable(component, isTargetable: true); } if (LFCUtilities.IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public override void OnDestroy() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) SPUtilities.PlaySnowmanParticle(((Component)this).transform.position, ((Component)this).transform.rotation); ((NetworkBehaviour)this).OnDestroy(); } private void OnTriggerEnter(Collider other) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) EnemyAICollisionDetect val = default(EnemyAICollisionDetect); if ((Object)(object)other != (Object)null && isPlayerHiding && ((Component)other).TryGetComponent(ref val)) { OnTriggerEnterEveryoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)val.mainScript).NetworkObject)); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnTriggerEnterEveryoneRpc(NetworkObjectReference enemyObject) { //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(2811583255u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref enemyObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2811583255u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); EnemyAI val5 = default(EnemyAI); if (((NetworkObjectReference)(ref enemyObject)).TryGet(ref val4, (NetworkManager)null) && LFCUtilities.TryGetComponentInChildren(((Component)val4).gameObject, ref val5)) { if (LFCUtilities.ShouldBeLocalPlayer(hidingPlayer)) { ExitSnowman(); } if (val5 is FrostbiteAI frostbiteAI) { frostbiteAI.HitFrostbiteForEveryone(); } else { LSStatusEffectRegistry.ApplyStatus(((Component)val5).gameObject, (StatusEffectType)1, (int)hidingPlayer.playerClientId, 10, 100, (EnemyAI)null, (Action)null, (Action)null, (Action)null); } } } public void RefreshHoverTip() { snowmanTrigger.hoverTip = ((currentStackedSnowBall < ConfigManager.amountSnowBallToBuild.Value) ? $"Add snowball {currentStackedSnowBall}/{ConfigManager.amountSnowBallToBuild.Value} : [LMB]" : "Enter : [LMB]"); } public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (currentStackedSnowBall >= ConfigManager.amountSnowBallToBuild.Value) { SpawnSnowPileServerRpc(); } return true; } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnSnowPileServerRpc() { //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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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(3871386934u, val2, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3871386934u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; SPUtilities.SpawnSnowPile(((Component)this).transform.position + Vector3.up, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2126077130u, new RpcReceiveHandler(__rpc_handler_2126077130), "SpawnFrostbiteServerRpc"); ((NetworkBehaviour)this).__registerRpc(547426965u, new RpcReceiveHandler(__rpc_handler_547426965), "SpawnFrostbiteEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2414602180u, new RpcReceiveHandler(__rpc_handler_2414602180), "BuildSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(913681031u, new RpcReceiveHandler(__rpc_handler_913681031), "EnterSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(668333629u, new RpcReceiveHandler(__rpc_handler_668333629), "ExitSnowmanEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2811583255u, new RpcReceiveHandler(__rpc_handler_2811583255), "OnTriggerEnterEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3871386934u, new RpcReceiveHandler(__rpc_handler_3871386934), "SpawnSnowPileServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2126077130(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).SpawnFrostbiteServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_547426965(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).SpawnFrostbiteEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2414602180(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int nbSnowBall = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).BuildSnowmanEveryoneRpc(nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_913681031(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).EnterSnowmanEveryoneRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_668333629(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).ExitSnowmanEveryoneRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2811583255(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 enemyObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).OnTriggerEnterEveryoneRpc(enemyObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3871386934(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Snowman)(object)target).SpawnSnowPileServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Snowman"; } } public class SnowPile : NetworkBehaviour { public int currentStackedItems; public InteractTrigger trigger; private Vector3 initialScale; private void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) currentStackedItems = ConfigManager.snowPileAmount.Value; initialScale = ((Component)this).transform.localScale; } public void GrabSnowBalls() { GrabbableObject val = GameNetworkManager.Instance.localPlayerController?.currentlyHeldObjectServer; if ((Object)(object)val != (Object)null && val is SnowGun snowGun && snowGun.currentStackedItems < ConfigManager.snowGunAmount.Value) { int nbSnowBall = ConfigManager.snowGunAmount.Value - snowGun.currentStackedItems; RemoveSnowBallEveryoneRpc(nbSnowBall); snowGun.UpdateStackedItemsEveryoneRpc(nbSnowBall); } else { ForceGrabObjectServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } [Rpc(/*Could not decode attribute arguments.*/)] public void ForceGrabObjectServerRpc(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_00e2: 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_0122: 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(1991341412u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1991341412u, 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(); GameObject val4 = Object.Instantiate(SnowPlaygrounds.snowBallItemObj, ((Component)component).transform.position, Quaternion.identity, StartOfRound.Instance.propsContainer); SnowBallItem component2 = val4.GetComponent(); ((GrabbableObject)component2).fallTime = 0f; NetworkObject component3 = val4.GetComponent(); component3.Spawn(false); LFCNetworkManager.Instance.ForceGrabObjectEveryoneRpc(NetworkObjectReference.op_Implicit(component3), (int)component.playerClientId); component2.InitializeEveryoneRpc(Mathf.Min(ConfigManager.snowBallAmount.Value, currentStackedItems)); RemoveSnowBallEveryoneRpc(ConfigManager.snowBallAmount.Value); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void RemoveSnowBallEveryoneRpc(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_00d5: 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_00eb: 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) 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(4283443941u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, nbSnowBall); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4283443941u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; float num = 0.05f * (float)nbSnowBall; Transform transform = ((Component)this).transform; transform.localScale -= initialScale * Mathf.Max(num, 0f); currentStackedItems -= nbSnowBall; if (currentStackedItems <= 0 && LFCUtilities.IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1991341412u, new RpcReceiveHandler(__rpc_handler_1991341412), "ForceGrabObjectServerRpc"); ((NetworkBehaviour)this).__registerRpc(4283443941u, new RpcReceiveHandler(__rpc_handler_4283443941), "RemoveSnowBallEveryoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1991341412(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPile)(object)target).ForceGrabObjectServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4283443941(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int nbSnowBall = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowPile)(object)target).RemoveSnowBallEveryoneRpc(nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowPile"; } } } namespace SnowPlaygrounds.Behaviours.Items { public class FrostBall : LFCBouncyAoEProjectile { protected override void PlayExplosionFx(Vector3 position, Quaternion rotation) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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) GameObject val = Object.Instantiate(SnowPlaygrounds.frostExplosionParticle, position, rotation); ParticleSystem component = val.GetComponent(); float num; if (!((Object)(object)component != (Object)null)) { num = 2f; } else { MainModule main = component.main; num = ((MainModule)(ref main)).duration; } Object.Destroy((Object)(object)val, num); } protected override void PlayExplosionSfx(Vector3 position) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) LFCGlobalManager.PlayAudio("Lega Fusion Core" + ((Object)LegaFusionCore.poisonExplosionAudio).name, position, true); } protected override void OnAffectPlayerServer(PlayerControllerB player) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) LSNetworkManager.Instance.ApplyStatusEveryoneRpc(base.throwingPlayer, (int)player.playerClientId, 1, 10, 10, default(NetworkObjectReference)); } protected override void OnAffectEnemyServer(EnemyAI enemy) { //IL_0023: 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_0035: Unknown result type (might be due to invalid IL or missing references) if (enemy is FrostbiteAI frostbiteAI) { frostbiteAI.HitFrostbiteEveryoneRpc(isFrostBall: true); } else { LSNetworkManager.Instance.ApplyStatusEveryoneRpc(base.throwingPlayer, NetworkObjectReference.op_Implicit(((NetworkBehaviour)enemy).NetworkObject), 1, 10, 100, default(NetworkObjectReference)); } } protected override void __initializeVariables() { ((LFCBouncyAoEProjectile)this).__initializeVariables(); } protected override void __initializeRpcs() { ((LFCBouncyAoEProjectile)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FrostBall"; } } public class SnowBallItem : PhysicsProp { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SnowBallItem <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown int num = <>1__state; SnowBallItem snowBallItem = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; snowBallItem.ThrowSnowBallServerRpc(((Component)((GrabbableObject)snowBallItem).playerHeldBy.gameplayCamera).transform.forward, 30f, 3f); <>2__current = (object)new WaitForSeconds(ConfigManager.snowBallThrowCooldown.Value); <>1__state = 1; return true; case 1: <>1__state = -1; snowBallItem.throwCooldownCoroutine = 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 Rigidbody rigidbody; public int currentStackedItems; public PlayerControllerB throwingPlayer; public Coroutine throwCooldownCoroutine; [Rpc(/*Could not decode attribute arguments.*/)] public void InitializeEveryoneRpc(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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3117236601u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, nbSnowBall); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3117236601u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentStackedItems = nbSnowBall; } } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && throwCooldownCoroutine == null) { throwCooldownCoroutine = ((MonoBehaviour)this).StartCoroutine(ThrowCooldownCoroutine()); } } [IteratorStateMachine(typeof(d__6))] private IEnumerator ThrowCooldownCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this }; } [Rpc(/*Could not decode attribute arguments.*/)] public void ThrowSnowBallServerRpc(Vector3 direction, float speed, float angleDeg) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_010b: 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_0141: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1488742282u, val2, val, (SendTo)2, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref direction); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref speed, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref angleDeg, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1488742282u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val4 = Object.Instantiate(SnowPlaygrounds.snowBallProjectileObj, ((Component)this).transform.position, Quaternion.identity); val4.GetComponent().Spawn(false); SnowBallProjectile component = val4.GetComponent(); component.ThrowFromPositionEveryoneRpc((int)((GrabbableObject)this).playerHeldBy.playerClientId, ((Component)this).transform.position, direction, speed, angleDeg); UpdateStackedItemsEveryoneRpc(); if (currentStackedItems <= 0) { LFCNetworkManager.Instance.DestroyObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)this).GetComponent())); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void UpdateStackedItemsEveryoneRpc() { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2987882466u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2987882466u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentStackedItems--; if (((GrabbableObject)this).isHeld && !((GrabbableObject)this).isPocketed && LFCUtilities.ShouldBeLocalPlayer(((GrabbableObject)this).playerHeldBy)) { ((GrabbableObject)this).SetControlTipsForItem(); } } } public override void SetControlTipsForItem() { int num = Array.FindIndex(((GrabbableObject)this).itemProperties.toolTips, (string s) => s.StartsWith("Snowball Amount : ", StringComparison.Ordinal)); if (num >= 0) { ((GrabbableObject)this).itemProperties.toolTips[num] = string.Format("{0}{1}", "Snowball Amount : ", currentStackedItems); HUDManager.Instance.ChangeControlTipMultiple(((GrabbableObject)this).itemProperties.toolTips, true, ((GrabbableObject)this).itemProperties); } } protected override void __initializeVariables() { ((PhysicsProp)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 ((NetworkBehaviour)this).__registerRpc(3117236601u, new RpcReceiveHandler(__rpc_handler_3117236601), "InitializeEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1488742282u, new RpcReceiveHandler(__rpc_handler_1488742282), "ThrowSnowBallServerRpc"); ((NetworkBehaviour)this).__registerRpc(2987882466u, new RpcReceiveHandler(__rpc_handler_2987882466), "UpdateStackedItemsEveryoneRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_3117236601(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int nbSnowBall = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallItem)(object)target).InitializeEveryoneRpc(nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1488742282(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 direction = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref direction); float speed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speed, default(ForPrimitives)); float angleDeg = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref angleDeg, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallItem)(object)target).ThrowSnowBallServerRpc(direction, speed, angleDeg); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2987882466(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallItem)(object)target).UpdateStackedItemsEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowBallItem"; } } public class SnowBallProjectile : NetworkBehaviour, IHittable { [CompilerGenerated] private sealed class d__9 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public EnemyAI enemy; private LFCEnemySpeedBehaviour 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_003a: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; LFCCustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { ((Component)enemy).gameObject }, SnowPlaygrounds.snowShader, "Snow PlaygroundsSnowBallFreeze", default(Color)); 5__2 = ((Component)enemy).GetComponent(); LFCEnemySpeedBehaviour obj2 = 5__2; if (obj2 != null) { obj2.AddSpeedData("Snow Playgrounds", 1f / ConfigManager.snowBallSlowdownFactor.Value - 1f, enemy.agent.speed); } <>2__current = (object)new WaitForSeconds(ConfigManager.snowBallSlowdownDuration.Value); <>1__state = 1; return true; } case 1: { <>1__state = -1; LFCEnemySpeedBehaviour obj = 5__2; if (obj != null) { obj.RemoveSpeedData("Snow Playgrounds"); } LFCCustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { ((Component)enemy).gameObject }, "Snow PlaygroundsSnowBallFreeze"); 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 Rigidbody rigidbody; public PlayerControllerB throwingPlayer; public bool deactivated; [Rpc(/*Could not decode attribute arguments.*/)] public void ThrowFromPositionEveryoneRpc(int playerId, Vector3 startPosition, Vector3 direction, float speed, float angleDeg) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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(3784470604u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref direction); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref speed, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref angleDeg, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3784470604u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!deactivated && (Object)(object)rigidbody != (Object)null) { throwingPlayer = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent(); ((Component)this).transform.position = startPosition; rigidbody.position = startPosition; rigidbody.velocity = Vector3.zero; rigidbody.AddForce(ComputeArcVelocity(direction, speed, angleDeg), (ForceMode)2); } } } private static Vector3 ComputeArcVelocity(Vector3 direction, float speed, float angleDeg) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(direction.x, 0f, direction.z); float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude <= 0.0001f) { return Vector3.up * speed; } float num = angleDeg * (MathF.PI / 180f); float num2 = magnitude / (speed * Mathf.Cos(num)); float num3 = direction.y / num2 - 0.5f * Physics.gravity.y * num2; Vector3 val2 = ((Vector3)(ref val)).normalized * (speed * Mathf.Cos(num)); return val2 + Vector3.up * num3; } private void OnCollisionEnter(Collision collision) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = default(PlayerControllerB); EnemyAI val2 = default(EnemyAI); if (collision != null && !deactivated && LFCUtilities.IsServer && !((Object)(object)rigidbody == (Object)null) && (!((Object)(object)collision.collider != (Object)null) || (!LFCUtilities.TryGetComponentInParent(((Component)collision.collider).gameObject, ref val) && !LFCUtilities.TryGetComponentInParent(((Component)collision.collider).gameObject, ref val2)))) { ContactPoint contact = collision.GetContact(0); Vector3 point = ((ContactPoint)(ref contact)).point; Vector3 normal = ((ContactPoint)(ref contact)).normal; ExplodeServerRpc(); ApplySnowDecalEveryoneRpc(point, normal); } } [Rpc(/*Could not decode attribute arguments.*/)] private void ApplySnowDecalEveryoneRpc(Vector3 point, Vector3 normal) { //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_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_00e3: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(359292077u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref point); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref normal); ((NetworkBehaviour)this).__endSendRpc(ref val3, 359292077u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val4 = Object.Instantiate(SnowPlaygrounds.snowDecal); val4.transform.position = point + normal * 0.01f; val4.transform.forward = normal; SnowPlaygrounds.snowDecals.Add(val4); SPUtilities.SnowBallImpact(val4.transform.position, Quaternion.LookRotation(normal)); } } } private void OnTriggerEnter(Collider collider) { //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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)collider != (Object)null) || deactivated) { return; } if (LFCUtilities.IsServer) { EnemyAICollisionDetect val = default(EnemyAICollisionDetect); if (((Component)collider).TryGetComponent(ref val) && (Object)(object)val.mainScript != (Object)null) { DeactivateProjectile(); ExplodeServerRpc(); HandleEnemyHitEveryoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)val.mainScript).NetworkObject), ((Component)this).transform.position); return; } Snowman snowman = default(Snowman); if (((Component)collider).TryGetComponent(ref snowman) && (Object)(object)snowman != (Object)null) { DeactivateProjectile(); ExplodeServerRpc(); if (snowman.isEnemyHiding) { snowman.SpawnFrostbiteServerRpc(); } else if ((Object)(object)snowman.hidingPlayer != (Object)null) { snowman.ExitSnowmanEveryoneRpc((int)snowman.hidingPlayer.playerClientId); } else { HandleSnowmanHitEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)snowman).GetComponent())); } return; } } PlayerControllerB val2 = default(PlayerControllerB); if (((Component)collider).TryGetComponent(ref val2) && LFCUtilities.ShouldBeLocalPlayer(val2) && (Object)(object)val2 != (Object)(object)throwingPlayer) { ExplodeServerRpc(); HandlePlayerHitEveryoneRpc((int)val2.playerClientId, ((Component)this).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] private void HandleEnemyHitEveryoneRpc(NetworkObjectReference enemyObject, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_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_00fb: 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) 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(46124941u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref enemyObject, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendRpc(ref val3, 46124941u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); EnemyAI val5 = default(EnemyAI); if (((NetworkObjectReference)(ref enemyObject)).TryGet(ref val4, (NetworkManager)null) && LFCUtilities.TryGetComponentInChildren(((Component)val4).gameObject, ref val5)) { SPUtilities.SnowBallImpact(position, ((Component)val5).transform.rotation); if (val5 is FrostbiteAI frostbiteAI) { frostbiteAI.HitFrostbiteForEveryone(); } else { ((MonoBehaviour)this).StartCoroutine(FreezeEnemyCoroutine(val5)); } } } [IteratorStateMachine(typeof(d__9))] private IEnumerator FreezeEnemyCoroutine(EnemyAI enemy) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { enemy = enemy }; } [Rpc(/*Could not decode attribute arguments.*/)] private void HandlePlayerHitEveryoneRpc(int playerId, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_0118: 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_0120: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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(1498586996u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1498586996u, 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(); SPUtilities.SnowBallImpact(position, ((Component)component).transform.rotation); if (LFCUtilities.ShouldBeLocalPlayer(component)) { Vector3 val4 = ((Component)component).transform.position - ((Component)throwingPlayer).transform.position; Vector3 val5 = ((Vector3)(ref val4)).normalized * ConfigManager.snowBallPushForce.Value; component.thisController.Move(val5); HUDManager.Instance.flashFilter = Mathf.Min(1f, HUDManager.Instance.flashFilter + 0.4f); } } } [Rpc(/*Could not decode attribute arguments.*/)] private void HandleSnowmanHitEveryoneRpc(NetworkObjectReference snowmanObject) { //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(2359638230u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref snowmanObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2359638230u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); Snowman snowman = default(Snowman); if (((NetworkObjectReference)(ref snowmanObject)).TryGet(ref val4, (NetworkManager)null) && LFCUtilities.TryGetComponentInChildren(((Component)val4).gameObject, ref snowman)) { Object.Destroy((Object)(object)((Component)snowman).gameObject); } } } [Rpc(/*Could not decode attribute arguments.*/)] private void ExplodeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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) 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(1454193519u, val2, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1454193519u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!deactivated) { DeactivateProjectile(); ExplodeEveryoneRpc(); } } } [Rpc(/*Could not decode attribute arguments.*/)] private void ExplodeEveryoneRpc() { //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) 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(2575066900u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2575066900u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!LFCUtilities.IsServer) { DeactivateProjectile(); } } } private void DeactivateProjectile() { deactivated = true; ParticleSystem[] componentsInChildren = ((Component)this).GetComponentsInChildren(); foreach (ParticleSystem val in componentsInChildren) { Object.Destroy((Object)(object)val); } MeshRenderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren(); foreach (MeshRenderer val2 in componentsInChildren2) { Object.Destroy((Object)(object)val2); } TrailRenderer[] componentsInChildren3 = ((Component)this).GetComponentsInChildren(); foreach (TrailRenderer val3 in componentsInChildren3) { Object.Destroy((Object)(object)val3); } Collider[] componentsInChildren4 = ((Component)this).GetComponentsInChildren(); foreach (Collider val4 in componentsInChildren4) { Object.Destroy((Object)(object)val4); } } public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if ((Object)(object)playerWhoHit != (Object)null && playerWhoHit.currentlyHeldObjectServer is Shovel) { ExplodeServerRpc(); } return true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3784470604u, new RpcReceiveHandler(__rpc_handler_3784470604), "ThrowFromPositionEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(359292077u, new RpcReceiveHandler(__rpc_handler_359292077), "ApplySnowDecalEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(46124941u, new RpcReceiveHandler(__rpc_handler_46124941), "HandleEnemyHitEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1498586996u, new RpcReceiveHandler(__rpc_handler_1498586996), "HandlePlayerHitEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2359638230u, new RpcReceiveHandler(__rpc_handler_2359638230), "HandleSnowmanHitEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1454193519u, new RpcReceiveHandler(__rpc_handler_1454193519), "ExplodeServerRpc"); ((NetworkBehaviour)this).__registerRpc(2575066900u, new RpcReceiveHandler(__rpc_handler_2575066900), "ExplodeEveryoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3784470604(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Vector3 direction = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref direction); float speed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speed, default(ForPrimitives)); float angleDeg = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref angleDeg, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).ThrowFromPositionEveryoneRpc(playerId, startPosition, direction, speed, angleDeg); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_359292077(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 point = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref point); Vector3 normal = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref normal); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).ApplySnowDecalEveryoneRpc(point, normal); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_46124941(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_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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference enemyObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyObject, default(ForNetworkSerializable)); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).HandleEnemyHitEveryoneRpc(enemyObject, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1498586996(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).HandlePlayerHitEveryoneRpc(playerId, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2359638230(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 snowmanObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref snowmanObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).HandleSnowmanHitEveryoneRpc(snowmanObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1454193519(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).ExplodeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2575066900(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowBallProjectile)(object)target).ExplodeEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowBallProjectile"; } } public class SnowGun : PhysicsProp { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SnowGun <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown int num = <>1__state; SnowGun snowGun = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; snowGun.ShootGunServerRpc(((Component)((GrabbableObject)snowGun).playerHeldBy.gameplayCamera).transform.forward); <>2__current = (object)new WaitForSeconds(1.5f); <>1__state = 1; return true; case 1: <>1__state = -1; snowGun.shootCooldownCoroutine = 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 int currentStackedItems; public Transform ShootPoint; public Coroutine shootCooldownCoroutine; public void InitializeForServer() { int value = Random.Range(20, 50); InitializeEveryoneRpc(value); } [Rpc(/*Could not decode attribute arguments.*/)] public void InitializeEveryoneRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2082552673u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, value); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2082552673u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((GrabbableObject)this).SetScrapValue(value); currentStackedItems = ConfigManager.snowGunAmount.Value; } } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && currentStackedItems > 0 && shootCooldownCoroutine == null) { shootCooldownCoroutine = ((MonoBehaviour)this).StartCoroutine(ShootCooldownCoroutine()); } } [IteratorStateMachine(typeof(d__6))] private IEnumerator ShootCooldownCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this }; } [Rpc(/*Could not decode attribute arguments.*/)] public void ShootGunServerRpc(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_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_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_00d5: 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_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2333120764u, val2, val, (SendTo)2, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref direction); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2333120764u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val4 = Object.Instantiate(SnowPlaygrounds.snowBallProjectileObj, ((Component)ShootPoint).transform.position, Quaternion.identity); val4.GetComponent().Spawn(false); PlayThrowEveryoneRpc(); SnowBallProjectile component = val4.GetComponent(); component.ThrowFromPositionEveryoneRpc((int)((GrabbableObject)this).playerHeldBy.playerClientId, ((Component)ShootPoint).transform.position, direction, 60f, 3f); UpdateStackedItemsEveryoneRpc(-1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PlayThrowEveryoneRpc() { //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_00c3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(975605538u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 975605538u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SPUtilities.PlayAudio(SnowPlaygrounds.snowShootAudio, ((Component)this).transform.position); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void UpdateStackedItemsEveryoneRpc(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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2732164792u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, nbSnowBall); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2732164792u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentStackedItems += nbSnowBall; if (((GrabbableObject)this).isHeld && !((GrabbableObject)this).isPocketed && LFCUtilities.ShouldBeLocalPlayer(((GrabbableObject)this).playerHeldBy)) { ((GrabbableObject)this).SetControlTipsForItem(); } } } public override void SetControlTipsForItem() { int num = Array.FindIndex(((GrabbableObject)this).itemProperties.toolTips, (string s) => s.StartsWith("Snowball Amount : ", StringComparison.Ordinal)); if (num >= 0) { ((GrabbableObject)this).itemProperties.toolTips[num] = string.Format("{0}{1}", "Snowball Amount : ", currentStackedItems); HUDManager.Instance.ChangeControlTipMultiple(((GrabbableObject)this).itemProperties.toolTips, true, ((GrabbableObject)this).itemProperties); } } protected override void __initializeVariables() { ((PhysicsProp)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 ((NetworkBehaviour)this).__registerRpc(2082552673u, new RpcReceiveHandler(__rpc_handler_2082552673), "InitializeEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2333120764u, new RpcReceiveHandler(__rpc_handler_2333120764), "ShootGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(975605538u, new RpcReceiveHandler(__rpc_handler_975605538), "PlayThrowEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2732164792u, new RpcReceiveHandler(__rpc_handler_2732164792), "UpdateStackedItemsEveryoneRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_2082552673(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowGun)(object)target).InitializeEveryoneRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2333120764(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 direction = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref direction); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowGun)(object)target).ShootGunServerRpc(direction); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_975605538(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowGun)(object)target).PlayThrowEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2732164792(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int nbSnowBall = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)1; ((SnowGun)(object)target).UpdateStackedItemsEveryoneRpc(nbSnowBall); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SnowGun"; } } } namespace SnowPlaygrounds.Behaviours.Enemies { public class FrostbiteAI : EnemyAI { public enum State { WANDERING, CHASING, THROWING } [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerControllerB player; public FrostbiteAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003b: 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_007c: Expected O, but got Unknown int num = <>1__state; FrostbiteAI frostbiteAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; if (ConfigManager.frostbiteEating.Value) { LFCNetworkManager.Instance.KillPlayerEveryoneRpc((int)player.playerClientId, Vector3.zero, false, 6); } else { LFCNetworkManager.Instance.DamagePlayerEveryoneRpc((int)player.playerClientId, ConfigManager.frostbiteDamage.Value, true, true, 6); } <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; if (ConfigManager.frostbiteEating.Value) { ((EnemyAI)frostbiteAI).SwitchToBehaviourClientRpc(0); } frostbiteAI.attackCoroutine = 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(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FrostbiteAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown int num = <>1__state; FrostbiteAI frostbiteAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; LFCCustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { ((Component)frostbiteAI).gameObject }, SnowPlaygrounds.snowShader, "Snow PlaygroundsFrostbiteHit", default(Color)); <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; case 1: <>1__state = -1; LFCCustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { ((Component)frostbiteAI).gameObject }, "Snow PlaygroundsFrostbiteHit"); 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(); } } [CompilerGenerated] private sealed class d__18 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FrostbiteAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__18(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; FrostbiteAI frostbiteAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; frostbiteAI.canThrow = false; frostbiteAI.DoAnimationEveryoneRpc("startThrow"); <>2__current = LFCEnemyManager.WaitForFullAnimation((EnemyAI)(object)frostbiteAI, "throw", 10f, 0); <>1__state = 1; return true; case 1: { <>1__state = -1; frostbiteAI.PlayThrowEveryoneRpc(); GameObject val = Object.Instantiate(SnowPlaygrounds.frostBallObj, ((Component)frostbiteAI.ThrowPoint).transform.position, Quaternion.identity); val.GetComponent().Spawn(false); ((LFCBouncyAoEProjectile)val.GetComponent()).ThrowFromPositionEveryoneRpc(((NetworkBehaviour)frostbiteAI).NetworkObjectId, ((Component)frostbiteAI.ThrowPoint).transform.position, ((Component)((EnemyAI)frostbiteAI).targetPlayer).transform.position + Vector3.up * 1.5f - ((Component)frostbiteAI.ThrowPoint).transform.position, ((EnemyAI)frostbiteAI).isOutside); frostbiteAI.throwCoroutine = 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 Transform TurnCompass; public AudioClip[] MoveSounds = Array.Empty(); public AudioClip ThrowSound; public Transform ThrowPoint; public float moveTimer; public float throwTimer; public float throwCooldown = 5f; public bool canThrow; public Coroutine throwCoroutine; public Coroutine attackCoroutine; public override void Start() { //IL_0014: 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) ((EnemyAI)this).Start(); base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SetEnemyOutside(((Component)this).transform.position.y > -80f); } public override void Update() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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) ((EnemyAI)this).Update(); if (!base.isEnemyDead && !StartOfRound.Instance.allPlayersDead) { PlayMoveSound(); int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if ((Object)(object)base.targetPlayer != (Object)null && (currentBehaviourStateIndex == 1 || currentBehaviourStateIndex == 2)) { TurnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, TurnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } LFCUtilities.UpdateTimer(ref throwTimer, throwCooldown, !canThrow, (Action)delegate { canThrow = true; }); } } public void PlayMoveSound() { if (base.currentBehaviourStateIndex != 2) { moveTimer -= Time.deltaTime; if (MoveSounds.Length != 0 && moveTimer <= 0f) { base.creatureSFX.PlayOneShot(MoveSounds[Random.Range(0, MoveSounds.Length)]); moveTimer = ((base.currentBehaviourStateIndex == 0) ? 0.75f : 0.5f); } } } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (!base.isEnemyDead && !StartOfRound.Instance.allPlayersDead) { switch (base.currentBehaviourStateIndex) { case 0: DoWandering(); break; case 1: DoChasing(); break; case 2: DoThrowing(); break; } } } public void DoWandering() { base.agent.speed = 2f; if (LFCEnemyManager.FoundClosestPlayerInRange((EnemyAI)(object)this, 30, 15, 60f, false)) { ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } public void DoChasing() { //IL_0058: 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_0087: Unknown result type (might be due to invalid IL or missing references) if (attackCoroutine == null) { base.agent.speed = 4f; float num = default(float); if (!LFCEnemyManager.TargetClosestPlayerInAnyCase((EnemyAI)(object)this, ref num, false) || (num > 30f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } else if (CanThrow() && num <= 20f && ((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null)) { ((EnemyAI)this).SwitchToBehaviourClientRpc(2); } else { ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } } } public void DoThrowing() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (throwCoroutine == null) { base.agent.speed = 0f; if (!CanThrow() || Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 30f || !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null)) { DoAnimationEveryoneRpc("startMove"); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } else { throwCoroutine = ((MonoBehaviour)this).StartCoroutine(ThrowCoroutine()); } } } [IteratorStateMachine(typeof(d__18))] public IEnumerator ThrowCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__18(0) { <>4__this = this }; } public void CancelThrowCoroutine() { if (throwCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(throwCoroutine); throwCoroutine = null; } } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (base.currentBehaviourStateIndex != 0) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if (LFCUtilities.ShouldBeLocalPlayer(val)) { AttackServerRpc((int)val.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void AttackServerRpc(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)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3898406802u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3898406802u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.currentBehaviourStateIndex != 0 && attackCoroutine == null) { attackCoroutine = ((MonoBehaviour)this).StartCoroutine(AttackCoroutine(StartOfRound.Instance.allPlayerObjects[playerId].GetComponent())); } } } [IteratorStateMachine(typeof(d__22))] public IEnumerator AttackCoroutine(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this, player = player }; } public void CancelAttackCoroutine() { if (attackCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(attackCoroutine); attackCoroutine = null; } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (!base.isEnemyDead && ConfigManager.frostbiteDefaultHit.Value) { HitFrostbiteForEveryone(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void HitFrostbiteEveryoneRpc(bool isFrostBall = false) { //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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(429385405u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref isFrostBall, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 429385405u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitFrostbiteForEveryone(isFrostBall); } } } public void HitFrostbiteForEveryone(bool isFrostBall = false) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) if (isFrostBall) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); if (LFCUtilities.IsServer) { SpawnSnowGunServerRpc(); } return; } ((EnemyAI)this).HitEnemy(1, (PlayerControllerB)null, false, -1); base.enemyHP--; if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); if (LFCUtilities.IsServer) { SPUtilities.SpawnSnowPile(((Component)this).transform.position + Vector3.up, ((Component)this).transform.rotation); } } else { ((MonoBehaviour)this).StartCoroutine(HitCoroutine()); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpawnSnowGunServerRpc() { //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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(79826766u, val2, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 79826766u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SnowGun snowGun = LFCObjectsManager.SpawnObjectForServer(SnowPlaygrounds.snowGunObj, ((Component)this).transform.position + Vector3.up * 0.5f) as SnowGun; snowGun.InitializeForServer(); } } } [IteratorStateMachine(typeof(d__28))] private IEnumerator HitCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(false); if (LFCUtilities.IsServer) { CancelThrowCoroutine(); CancelAttackCoroutine(); } } public bool CanThrow() { if (canThrow && (Object)(object)base.targetPlayer != (Object)null) { return !LSStatusEffectRegistry.HasStatus(((Component)base.targetPlayer).gameObject, (StatusEffectType)1); } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void PlayThrowEveryoneRpc() { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1879828850u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1879828850u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureSFX.PlayOneShot(ThrowSound); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DoAnimationEveryoneRpc(string animationState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(139742007u, val2, val, (SendTo)6, (RpcDelivery)0); bool flag = animationState != null; ((FastBufferWriter)(ref val3)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(animationState, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 139742007u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger(animationState); } } public override void OnDestroy() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) SPUtilities.PlaySnowmanParticle(((Component)this).transform.position, ((Component)this).transform.rotation); LFCStatRegistry.RemoveModifier("Speed", "Snow PlaygroundsSnowBallEnemy"); LFCCustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { ((Component)this).gameObject }, "default"); ((EnemyAI)this).OnDestroy(); } protected override void __initializeVariables() { ((EnemyAI)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 ((NetworkBehaviour)this).__registerRpc(3898406802u, new RpcReceiveHandler(__rpc_handler_3898406802), "AttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(429385405u, new RpcReceiveHandler(__rpc_handler_429385405), "HitFrostbiteEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(79826766u, new RpcReceiveHandler(__rpc_handler_79826766), "SpawnSnowGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1879828850u, new RpcReceiveHandler(__rpc_handler_1879828850), "PlayThrowEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(139742007u, new RpcReceiveHandler(__rpc_handler_139742007), "DoAnimationEveryoneRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3898406802(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((FrostbiteAI)(object)target).AttackServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_429385405(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool isFrostBall = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isFrostBall, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FrostbiteAI)(object)target).HitFrostbiteEveryoneRpc(isFrostBall); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_79826766(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FrostbiteAI)(object)target).SpawnSnowGunServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1879828850(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((FrostbiteAI)(object)target).PlayThrowEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_139742007(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationState = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationState, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((FrostbiteAI)(object)target).DoAnimationEveryoneRpc(animationState); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FrostbiteAI"; } } } 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 SnowPlaygrounds.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }