using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Dissonance; using GameNetcodeStuff; using HarmonyLib; using JetBrains.Annotations; using LCPlanAssassin.AssetLoader; using LCPlanAssassin.Components; using LCPlanAssassin.Items; using LCPlanAssassin.NetcodePatcher; using LCPlanAssassin.Patchers; using LCPlanAssassin.TarotCard; using LCPlanAssassin.UI; using LCPlanAssassin.Utils; using LCTarrotCard; using LCTarrotCard.Cards; using LCTarrotCard.Items; using LCTarrotCard.Ressource; using Unity.Netcode; using UnityEngine; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("0.0.0.0")] [module: NetcodePatchedAssembly] namespace LCPlanAssassin { [BepInPlugin("LCPlanAssassin", "Plan d'assassin", "2.7.4")] [BepInDependency("LCTarotCard", "1.1.2")] public class ModBase : BaseUnityPlugin { public static ModBase Instance; public ManualLogSource logger; internal Harmony harmony; internal static bool HasError; public static KeyboardShortcut TestKey; private void Awake() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Instance != (Object)null)) { Instance = this; harmony = new Harmony("LCPlanAssassin"); logger = Logger.CreateLogSource("LCPlanAssassin"); TestKey = new KeyboardShortcut((KeyCode)96, Array.Empty()); Assets.LoadBundles(); if (!HasError) { harmony.PatchAll(); RPC_Init(); logger.LogInfo((object)"LCPlanAssassin correctly loaded"); } } } internal static void RPC_Init() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false).Length != 0) { methodInfo.Invoke(null, null); } } } } internal static void LogDebug(object msg) { Instance.logger.LogDebug((object)msg.ToString()); } } [HarmonyPatch(typeof(PlayerControllerB))] internal class Test { [HarmonyPatch("Update")] [HarmonyPostfix] private static void TestPatch(PlayerControllerB __instance) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (((KeyboardShortcut)(ref ModBase.TestKey)).IsDown() && ((NetworkBehaviour)__instance).IsOwner && ModConstants.TestMode && __instance.isPlayerControlled) { InstantiateAndReturnGrabbableObject(Assets.CheeseItem.spawnPrefab, ((Component)__instance).transform.position); InstantiateAndReturnGrabbableObject(Assets.BolItem.spawnPrefab, ((Component)__instance).transform.position); } } private static GrabbableObject InstantiateAndReturnGrabbableObject(GameObject prefab, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: 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_0030: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(prefab, position, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; val.GetComponent().Spawn(false); return component; } } public static class ModConstants { public const string MOD_GUID = "LCPlanAssassin"; public const string MOD_NAME = "Plan d'assassin"; public const string MOD_VERSION = "2.7.4"; public static readonly bool TestMode; } } namespace LCPlanAssassin.AssetLoader { internal static class Assets { internal static AssetBundle planBundle; public static AudioClip EatClip; public static readonly List PlanClips = new List(); public static readonly List KaquiteClips = new List(); public static readonly List KeyboardClips = new List(); public static AudioClip LowFan; public static AudioClip HighFan; public static AudioClip MowStartClip; public static AudioClip MowLoopClip; public static AudioClip MowEndClip; public static Material ScreenOffMat; public static Material ScreenOnMat; public static VideoClip TranstitionClip; public static readonly List ScreenClips = new List(); public static AudioClip Comsau; public static List SpringClips = new List(); public static AudioClip RingtoneClip; public static List TelClips = new List(); public static Material TelMat; public static Material CallingMat; public static AudioClip RightClip; public static AudioClip WrongClip; public static Material WrongMat; public static Material RightMat; public static AudioClip VacuumStartClip; public static AudioClip VacuumLoopClip; public static AudioClip VacuumEndClip; public static List FartClips = new List(); public static AudioClip SplatClip; public static AudioClip FluteClip; public static AudioClip JetpackBroken; public static AudioClip JetPackThrustStart; public static Material OrangeBurn; public static AudioClip JeSuisOuClip; public static AudioClip TheMoolClip; public static List RotateClips = new List(); public static List SpectrumMusics = new List(); public static VideoClip GordionClip; public static VideoClip OtherClip; public static VideoClip Valo1; public static VideoClip Valo2; public static VideoClip Planet; public static VideoClip TintinClip; public static AudioClip TintinAudio; public static readonly List NClips = new List(); internal static GameObject JumpscareCanvas; public static GameObject JumpscareObj; public static readonly List ScreamClips = new List(); public static Item RouterItem; public static Item OysterItem; public static Item BolItem; public static Item BoosterItem; public static Item CheeseItem; public static List StomachacheClips = new List(); public static Item KkItem; public static Item AtiItem; public static Item ChopstickItem; public static Item FluteItem; public static Item LieDetectorItem; public static AudioClip LeFauxClip; public static Material JsuiouMat; public static Material NWordMat; public static Material TheMoolMat; public static Material SpectrumMat; public static Material RotateMat; public static Material PlusTardMat; public static AudioClip PlusTardClip; public static Material DiscoMat; public static SpawnRarity PlanRarity; public static SpawnRarity SausageTicketRarity; public static SpawnRarity PCRarity; public static SpawnRarity CasqueRarity; public static SpawnRarity HandRarity; public static SpawnRarity KeyboardRarity; public static SpawnRarity KakahuetRarity; public static SpawnRarity MowerRarity; public static SpawnRarity ScreenRarity; public static SpawnRarity RouterRarity; public static SpawnRarity RavcamRarity; public static SpawnRarity TelephoneRarity; public static SpawnRarity LieDetectorRarity; public static SpawnRarity VacuumRarity; public static SpawnRarity CheeseRarity; public static SpawnRarity FluteRarity; public static SpawnRarity ChopstickRarity; public static SpawnRarity BolRarity; public static SpawnRarity BoosterRarity; public static SpawnRarity AtiRarity; public static GameObject DiscoBall; public static Item PlanAssassin { get; private set; } public static Item SausageTicket { get; private set; } public static Item Sausage { get; private set; } public static Item PCRavix { get; private set; } public static Item MicroKaquite { get; private set; } public static Item LeftHeadsetItem { get; private set; } public static Item RightHeadsetItem { get; private set; } public static Item HandItem { get; private set; } public static Item KeyboardItem { get; private set; } public static Item KakahuetItem { get; private set; } public static Item MowerItem { get; private set; } public static Item ScreenItem { get; private set; } public static Item RavcamItem { get; private set; } public static Item TelephoneItem { get; private set; } public static Item VacuumItem { get; private set; } public static void LoadBundles() { Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("LCPlanAssassin.Resources.planbundle"); if (manifestResourceStream == null) { ModBase.Instance.logger.LogError((object)"Cannot load assets bundle, stream is null"); ModBase.HasError = true; return; } planBundle = AssetBundle.LoadFromStream(manifestResourceStream); if ((Object)(object)planBundle == (Object)null) { ModBase.Instance.logger.LogError((object)"Cannot load assets bundle, bundle is null"); ModBase.HasError = true; } else { LoadTarotCards(); LoadAssets(); InitScraps(); } } private static void LoadAssets() { PlanAssassin = planBundle.LoadAsset("Assets/PlanAssassin.asset"); PlanAssassinBehaviour planAssassinBehaviour = PlanAssassin.spawnPrefab.AddComponent(); ((GrabbableObject)planAssassinBehaviour).grabbable = true; ((GrabbableObject)planAssassinBehaviour).grabbableToEnemies = false; ((GrabbableObject)planAssassinBehaviour).itemProperties = PlanAssassin; PlanClips.Add(planBundle.LoadAsset("Assets/SFX/ballon.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/cabane.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/camion.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/harbor.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/planassassin.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/temaplan.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/vandal.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/chien.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/monde.ogg")); PlanClips.Add(planBundle.LoadAsset("Assets/SFX/pigeon.ogg")); Sausage = planBundle.LoadAsset("Assets/Sausage.asset"); SausageBehaviour sausageBehaviour = Sausage.spawnPrefab.AddComponent(); ((GrabbableObject)sausageBehaviour).grabbable = true; ((GrabbableObject)sausageBehaviour).grabbableToEnemies = true; ((GrabbableObject)sausageBehaviour).itemProperties = Sausage; PCRavix = planBundle.LoadAsset("Assets/PC/pc_ravix.asset"); PcRavixBehaviour pcRavixBehaviour = PCRavix.spawnPrefab.AddComponent(); ((GrabbableObject)pcRavixBehaviour).grabbable = true; ((GrabbableObject)pcRavixBehaviour).grabbableToEnemies = true; ((GrabbableObject)pcRavixBehaviour).itemProperties = PCRavix; SausageTicket = planBundle.LoadAsset("Assets/Ticket/ticket.asset"); SausageTicketBehaviour sausageTicketBehaviour = SausageTicket.spawnPrefab.AddComponent(); ((GrabbableObject)sausageTicketBehaviour).grabbable = true; ((GrabbableObject)sausageTicketBehaviour).grabbableToEnemies = true; ((GrabbableObject)sausageTicketBehaviour).itemProperties = SausageTicket; MicroKaquite = planBundle.LoadAsset("Assets/Micro/casque.asset"); CasqueBehaviour casqueBehaviour = MicroKaquite.spawnPrefab.AddComponent(); ((GrabbableObject)casqueBehaviour).grabbable = true; ((GrabbableObject)casqueBehaviour).grabbableToEnemies = true; ((GrabbableObject)casqueBehaviour).itemProperties = MicroKaquite; LeftHeadsetItem = planBundle.LoadAsset("Assets/Micro/casql.asset"); RightHeadsetItem = planBundle.LoadAsset("Assets/Micro/casqr.asset"); HandItem = planBundle.LoadAsset("Assets/Hand/Hand.asset"); HandBehaviour handBehaviour = HandItem.spawnPrefab.AddComponent(); ((GrabbableObject)handBehaviour).grabbable = true; ((GrabbableObject)handBehaviour).grabbableToEnemies = true; ((GrabbableObject)handBehaviour).itemProperties = HandItem; KeyboardItem = planBundle.LoadAsset("Assets/Clavier/keyboard.asset"); KeyboardBehaviour keyboardBehaviour = KeyboardItem.spawnPrefab.AddComponent(); ((GrabbableObject)keyboardBehaviour).grabbable = true; ((GrabbableObject)keyboardBehaviour).grabbableToEnemies = true; ((GrabbableObject)keyboardBehaviour).itemProperties = KeyboardItem; KakahuetItem = planBundle.LoadAsset("Assets/kakahuet/kakahuet.asset"); KakahuetBehaviour kakahuetBehaviour = KakahuetItem.spawnPrefab.AddComponent(); ((GrabbableObject)kakahuetBehaviour).grabbable = true; ((GrabbableObject)kakahuetBehaviour).grabbableToEnemies = true; ((GrabbableObject)kakahuetBehaviour).itemProperties = KakahuetItem; MowerItem = planBundle.LoadAsset("Assets/mower/mower.asset"); MowerBehaviour mowerBehaviour = MowerItem.spawnPrefab.AddComponent(); ((GrabbableObject)mowerBehaviour).grabbable = true; ((GrabbableObject)mowerBehaviour).grabbableToEnemies = true; ((GrabbableObject)mowerBehaviour).itemProperties = MowerItem; ScreenItem = planBundle.LoadAsset("Assets/Screen/screen.asset"); ScreenBehaviour screenBehaviour = ScreenItem.spawnPrefab.AddComponent(); ((GrabbableObject)screenBehaviour).grabbable = true; ((GrabbableObject)screenBehaviour).grabbableToEnemies = true; ((GrabbableObject)screenBehaviour).itemProperties = ScreenItem; ScreenOffMat = planBundle.LoadAsset("Assets/Screen/ScreenOff.mat"); ScreenOnMat = planBundle.LoadAsset("Assets/Screen/ScreenRenderMat.mat"); TranstitionClip = planBundle.LoadAsset("Assets/Screen/transition.mp4"); for (int i = 0; i < 25; i++) { string text = "Assets/Screen/Clips/cg" + (i + 1) + ".mp4"; VideoClip item = planBundle.LoadAsset(text); ScreenClips.Add(item); } RouterItem = planBundle.LoadAsset("Assets/Router/router.asset"); RouterBehaviour routerBehaviour = RouterItem.spawnPrefab.AddComponent(); ((GrabbableObject)routerBehaviour).grabbable = true; ((GrabbableObject)routerBehaviour).grabbableToEnemies = true; ((GrabbableObject)routerBehaviour).itemProperties = RouterItem; OysterItem = planBundle.LoadAsset("Assets/PlanTarot/Oyster/themool.asset"); OysterBehaviour oysterBehaviour = OysterItem.spawnPrefab.AddComponent(); ((GrabbableObject)oysterBehaviour).grabbable = true; ((GrabbableObject)oysterBehaviour).grabbableToEnemies = true; ((GrabbableObject)oysterBehaviour).itemProperties = OysterItem; RavcamItem = planBundle.LoadAsset("Assets/Ravcam/ravixcam.asset"); RavcamBehaviour ravcamBehaviour = RavcamItem.spawnPrefab.AddComponent(); ((GrabbableObject)ravcamBehaviour).grabbable = true; ((GrabbableObject)ravcamBehaviour).grabbableToEnemies = true; ((GrabbableObject)ravcamBehaviour).itemProperties = RavcamItem; for (int j = 0; j < 3; j++) { SpringClips.Add(planBundle.LoadAsset("Assets/Ravcam/sp" + j + ".mp3")); } TelephoneItem = planBundle.LoadAsset("Assets/Telephone/telephone.asset"); TelephoneBehaviour telephoneBehaviour = TelephoneItem.spawnPrefab.AddComponent(); ((GrabbableObject)telephoneBehaviour).grabbable = true; ((GrabbableObject)telephoneBehaviour).grabbableToEnemies = true; ((GrabbableObject)telephoneBehaviour).itemProperties = TelephoneItem; RingtoneClip = planBundle.LoadAsset("Assets/Telephone/Clips/ling.mp3"); for (int k = 0; k < 5; k++) { TelClips.Add(planBundle.LoadAsset("Assets/Telephone/Clips/v" + k + ".mp4")); } TelMat = planBundle.LoadAsset("Assets/Telephone/TelScreenMat.mat"); CallingMat = planBundle.LoadAsset("Assets/Telephone/calling.mat"); LieDetectorItem = planBundle.LoadAsset("Assets/Lie/liedetec.asset"); LieDetectorBehaviour lieDetectorBehaviour = LieDetectorItem.spawnPrefab.AddComponent(); ((GrabbableObject)lieDetectorBehaviour).grabbable = true; ((GrabbableObject)lieDetectorBehaviour).grabbableToEnemies = true; ((GrabbableObject)lieDetectorBehaviour).itemProperties = LieDetectorItem; RightClip = planBundle.LoadAsset("Assets/Lie/correct.ogg"); WrongClip = planBundle.LoadAsset("Assets/Lie/wrong.ogg"); WrongMat = planBundle.LoadAsset("Assets/Lie/wrong.mat"); RightMat = planBundle.LoadAsset("Assets/Lie/right.mat"); VacuumItem = planBundle.LoadAsset("Assets/Aspi/aspi.asset"); AspiBehaviour aspiBehaviour = VacuumItem.spawnPrefab.AddComponent(); ((GrabbableObject)aspiBehaviour).grabbable = true; ((GrabbableObject)aspiBehaviour).grabbableToEnemies = true; ((GrabbableObject)aspiBehaviour).itemProperties = VacuumItem; CheeseItem = planBundle.LoadAsset("Assets/Cheese/cheese_item.asset"); CheeseBehaviour cheeseBehaviour = CheeseItem.spawnPrefab.AddComponent(); ((GrabbableObject)cheeseBehaviour).grabbable = true; ((GrabbableObject)cheeseBehaviour).grabbableToEnemies = true; ((GrabbableObject)cheeseBehaviour).itemProperties = CheeseItem; KkItem = planBundle.LoadAsset("Assets/Cheese/kk_item.asset"); KkBehaviour kkBehaviour = KkItem.spawnPrefab.AddComponent(); ((GrabbableObject)kkBehaviour).grabbable = true; ((GrabbableObject)kkBehaviour).grabbableToEnemies = true; ((GrabbableObject)kkBehaviour).itemProperties = KkItem; SplatClip = planBundle.LoadAsset("Assets/Cheese/splat.ogg"); ChopstickItem = planBundle.LoadAsset("Assets/ChopSticks/chopsticks.asset"); ChopstickBehaviour chopstickBehaviour = ChopstickItem.spawnPrefab.AddComponent(); ((GrabbableObject)chopstickBehaviour).grabbable = true; ((GrabbableObject)chopstickBehaviour).grabbableToEnemies = true; ((GrabbableObject)chopstickBehaviour).itemProperties = ChopstickItem; FluteItem = planBundle.LoadAsset("Assets/Flute/flute_item.asset"); FluteBehaviour fluteBehaviour = FluteItem.spawnPrefab.AddComponent(); ((GrabbableObject)fluteBehaviour).grabbable = true; ((GrabbableObject)fluteBehaviour).grabbableToEnemies = true; ((GrabbableObject)fluteBehaviour).itemProperties = FluteItem; FluteClip = planBundle.LoadAsset("Assets/Flute/dj.ogg"); BolItem = planBundle.LoadAsset("Assets/Ravix/Bol/bol.asset"); BolBehaviour bolBehaviour = BolItem.spawnPrefab.AddComponent(); ((GrabbableObject)bolBehaviour).grabbable = true; ((GrabbableObject)bolBehaviour).grabbableToEnemies = true; ((GrabbableObject)bolBehaviour).itemProperties = BolItem; BoosterItem = planBundle.LoadAsset("Assets/Ravix/Booster/Booster.asset"); BoosterBehaviour boosterBehaviour = BoosterItem.spawnPrefab.AddComponent(); ((GrabbableObject)boosterBehaviour).grabbable = true; ((GrabbableObject)boosterBehaviour).grabbableToEnemies = true; ((GrabbableObject)boosterBehaviour).itemProperties = BoosterItem; JetpackBroken = planBundle.LoadAsset("Assets/Ravix/Booster/JetpackBroken.wav"); JetPackThrustStart = planBundle.LoadAsset("Assets/Ravix/Booster/JetPackThrustStart.wav"); AtiItem = planBundle.LoadAsset("Assets/Ravix/ATI/ati.asset"); AtiBehaviour atiBehaviour = AtiItem.spawnPrefab.AddComponent(); ((GrabbableObject)atiBehaviour).grabbable = true; ((GrabbableObject)atiBehaviour).grabbableToEnemies = true; ((GrabbableObject)atiBehaviour).itemProperties = AtiItem; VacuumStartClip = planBundle.LoadAsset("Assets/Aspi/vac_start.ogg"); VacuumLoopClip = planBundle.LoadAsset("Assets/Aspi/vac_loop.ogg"); VacuumEndClip = planBundle.LoadAsset("Assets/Aspi/vac_end.ogg"); JsuiouMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/JsuiouMat.mat"); NWordMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/nwordMat.mat"); TheMoolMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/themoolMat.mat"); SpectrumMat = planBundle.LoadAsset("Assets/PlanTarot/Spectrum/SpecMat.mat"); RotateMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/360Mat.mat"); RotateClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Audio/aso36.ogg")); RotateClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Audio/tomo36.ogg")); OrangeBurn = planBundle.LoadAsset("Assets/PlanTarot/Mats/OrangeBurn.mat"); JeSuisOuClip = planBundle.LoadAsset("Assets/PlanTarot/Audio/jsuiou.ogg"); TheMoolClip = planBundle.LoadAsset("Assets/PlanTarot/Audio/themool.ogg"); for (int l = 0; l < 6; l++) { SpectrumMusics.Add(planBundle.LoadAsset("Assets/PlanTarot/Spectrum/s" + (l + 1) + ".mp3")); } EatClip = planBundle.LoadAsset("Assets/nomnom.ogg"); Comsau = planBundle.LoadAsset("Assets/comsau.mp3"); GordionClip = planBundle.LoadAsset("Assets/scout.mp4"); OtherClip = planBundle.LoadAsset("Assets/roblox.mp4"); Valo1 = planBundle.LoadAsset("Assets/val1.mp4"); Valo2 = planBundle.LoadAsset("Assets/val2.mp4"); Planet = planBundle.LoadAsset("Assets/plan1.mp4"); TintinClip = planBundle.LoadAsset("Assets/dupon.mp4"); TintinAudio = planBundle.LoadAsset("Assets/tintin.mp3"); LowFan = planBundle.LoadAsset("Assets/PC/fan_low.ogg"); HighFan = planBundle.LoadAsset("Assets/PC/fan_high.ogg"); HandBehaviour.RiseSfx = planBundle.LoadAsset("Assets/Hand/rise.ogg"); HandBehaviour.FunnySfx = planBundle.LoadAsset("Assets/Hand/funny.ogg"); HandBehaviour.DownSfx = planBundle.LoadAsset("Assets/Hand/down.ogg"); for (int m = 0; m < 7; m++) { string text2 = "Assets/Micro/p" + (m + 1) + ".ogg"; AudioClip item2 = planBundle.LoadAsset(text2); KaquiteClips.Add(item2); } MowStartClip = planBundle.LoadAsset("Assets/mower/mow_start.ogg"); MowLoopClip = planBundle.LoadAsset("Assets/mower/mow_loop.ogg"); MowEndClip = planBundle.LoadAsset("Assets/mower/mow_stop.ogg"); for (int n = 0; n < 5; n++) { string text3 = "Assets/Clavier/cl" + (n + 1) + ".ogg"; AudioClip item3 = planBundle.LoadAsset(text3); KeyboardClips.Add(item3); } for (int num = 0; num < 3; num++) { string text4 = "Assets/Cheese/s" + (num + 1) + ".ogg"; AudioClip item4 = planBundle.LoadAsset(text4); StomachacheClips.Add(item4); } FartClips.Add(planBundle.LoadAsset("Assets/Cheese/F1.mp3")); FartClips.Add(planBundle.LoadAsset("Assets/Cheese/F1.mp3")); NClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Jumpscare/nga.mp4")); NClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Jumpscare/nword.mp4")); NClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Jumpscare/nword1.mp4")); NClips.Add(planBundle.LoadAsset("Assets/PlanTarot/Jumpscare/nword2.mp4")); JumpscareCanvas = planBundle.LoadAsset("Assets/PlanTarot/Jumpscare/JumpscareCanvas.prefab"); JumpscareCanvas.AddComponent(); for (int num2 = 0; num2 < 6; num2++) { ScreamClips.Add(planBundle.LoadAsset("Assets/Scream/s" + (num2 + 1) + ".ogg")); } PlusTardMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/PlustardMat.mat"); PlusTardClip = planBundle.LoadAsset("Assets/PlanTarot/Audio/plustard.mp3"); DiscoMat = planBundle.LoadAsset("Assets/PlanTarot/Mats/DiscoMat.mat"); LeFauxClip = planBundle.LoadAsset("Assets/faux.ogg"); } private static void InitScraps() { PlanRarity = new SpawnRarity(10, PlanAssassin); PlanRarity.SetValues(-1, -1, 15, 35, 20, -1, 30, 30, 60, 50, 25); SausageTicketRarity = new SpawnRarity(20, SausageTicket); SausageTicketRarity.SetValues(15, -1, -1, 25, -1, 17, 30, 33, 45, 50); PCRarity = new SpawnRarity(9, PCRavix); PCRarity.SetValues(-1, 10, -1, 15, -1, 13, 22, 25, 40, 44, 40); CasqueRarity = new SpawnRarity(15, MicroKaquite); CasqueRarity.SetValues(10, -1, 13, 22, -1, 22, 20, 20, 40, 26, 33); HandRarity = new SpawnRarity(7, HandItem); HandRarity.SetValues(10, 15, 15, 40, -1, 30, 13, 10, 10, 35, 20); KeyboardRarity = new SpawnRarity(13, KeyboardItem); KeyboardRarity.SetValues(7, -1, 15, 20, 15, -1, 20, 25, 35, 35, 25); KakahuetRarity = new SpawnRarity(23, KakahuetItem); KakahuetRarity.SetValues(-1, -1, 25, 30, 30, -1, 30, 30, 35, 40); MowerRarity = new SpawnRarity(10, MowerItem); MowerRarity.SetValues(4, -1, 15, 15, 11, -1, 20, 25, 30, 28, 20); ScreenRarity = new SpawnRarity(12, ScreenItem); ScreenRarity.SetValues(5, 13, 15, 18, -1, 18, 19, 25, 20, 30); RouterRarity = new SpawnRarity(10, RouterItem); RouterRarity.CopyRaritiesFrom(KeyboardRarity); RavcamRarity = new SpawnRarity(15, RavcamItem); RavcamRarity.SetValues(10, -1, 15, 20, 15, -1, 20, 25, 35, 35, 25); TelephoneRarity = new SpawnRarity(10, TelephoneItem); TelephoneRarity.CopyRaritiesFrom(ScreenRarity); LieDetectorRarity = new SpawnRarity(10, LieDetectorItem); LieDetectorRarity.CopyRaritiesFrom(ScreenRarity); VacuumRarity = new SpawnRarity(15, VacuumItem); VacuumRarity.CopyRaritiesFrom(MowerRarity); CheeseRarity = new SpawnRarity(20, CheeseItem); CheeseRarity.CopyRaritiesFrom(SausageTicketRarity); FluteRarity = new SpawnRarity(7, FluteItem); FluteRarity.CopyRaritiesFrom(HandRarity); ChopstickRarity = new SpawnRarity(5, ChopstickItem); ChopstickRarity.CopyRaritiesFrom(RavcamRarity); ChopstickRarity.Multiply(2f); BolRarity = new SpawnRarity(15, BolItem); BolRarity.CopyRaritiesFrom(HandRarity); BoosterRarity = new SpawnRarity(8, BoosterItem); BoosterRarity.SetValues(-1, -1, -1, 12, 15, 10, 15, 17, 35, 22, 35); AtiRarity = new SpawnRarity(10, AtiItem); AtiRarity.CopyRaritiesFrom(RouterRarity); } private static void LoadTarotCards() { AllCards.RegisterCard(typeof(JsuisouCard), 2); AllCards.RegisterCard(typeof(NWordCard), 3); AllCards.RegisterCard(typeof(SpectrumCard), 5); AllCards.RegisterCard(typeof(RotateCard), 4); AllCards.RegisterCard(typeof(PlusTardCard), 4); AllCards.RegisterCard(typeof(DiscoCard), 5); } } [HarmonyPatch(typeof(GameNetworkManager))] internal class NetworkPatcher { [HarmonyPatch("Start")] [HarmonyPostfix] private static void RegisterItems() { NetworkManager component = ((Component)GameNetworkManager.Instance).GetComponent(); component.AddNetworkPrefab(Assets.PlanAssassin.spawnPrefab); component.AddNetworkPrefab(Assets.Sausage.spawnPrefab); component.AddNetworkPrefab(Assets.PCRavix.spawnPrefab); component.AddNetworkPrefab(Assets.SausageTicket.spawnPrefab); component.AddNetworkPrefab(Assets.MicroKaquite.spawnPrefab); component.AddNetworkPrefab(Assets.LeftHeadsetItem.spawnPrefab); component.AddNetworkPrefab(Assets.RightHeadsetItem.spawnPrefab); component.AddNetworkPrefab(Assets.HandItem.spawnPrefab); component.AddNetworkPrefab(Assets.KakahuetItem.spawnPrefab); component.AddNetworkPrefab(Assets.KeyboardItem.spawnPrefab); component.AddNetworkPrefab(Assets.MowerItem.spawnPrefab); component.AddNetworkPrefab(Assets.ScreenItem.spawnPrefab); component.AddNetworkPrefab(Assets.RouterItem.spawnPrefab); component.AddNetworkPrefab(Assets.OysterItem.spawnPrefab); component.AddNetworkPrefab(Assets.RavcamItem.spawnPrefab); component.AddNetworkPrefab(Assets.TelephoneItem.spawnPrefab); component.AddNetworkPrefab(Assets.LieDetectorItem.spawnPrefab); component.AddNetworkPrefab(Assets.VacuumItem.spawnPrefab); component.AddNetworkPrefab(Assets.CheeseItem.spawnPrefab); component.AddNetworkPrefab(Assets.KkItem.spawnPrefab); component.AddNetworkPrefab(Assets.ChopstickItem.spawnPrefab); component.AddNetworkPrefab(Assets.FluteItem.spawnPrefab); component.AddNetworkPrefab(Assets.BolItem.spawnPrefab); component.AddNetworkPrefab(Assets.BoosterItem.spawnPrefab); component.AddNetworkPrefab(Assets.AtiItem.spawnPrefab); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void InstantiateJump() { Assets.JumpscareObj = Object.Instantiate(Assets.JumpscareCanvas); } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void AddScrapItem(StartOfRound __instance) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) using (IEnumerator enumerator = __instance.unlockablesList.unlockables.Where((UnlockableItem unlockable) => unlockable.unlockableName == "Disco Ball").GetEnumerator()) { if (enumerator.MoveNext()) { UnlockableItem current = enumerator.Current; Assets.DiscoBall = Object.Instantiate(current.prefabObject, (Transform)null, true); Assets.DiscoBall.transform.position = new Vector3(0f, -1000f, 0f); ((Behaviour)Assets.DiscoBall.GetComponent()).enabled = false; ((Behaviour)Assets.DiscoBall.GetComponentInChildren()).enabled = false; ((Behaviour)Assets.DiscoBall.GetComponentInChildren()).enabled = false; ((Component)Assets.DiscoBall.transform.GetChild(1)).gameObject.SetActive(false); ((Renderer)((Component)Assets.DiscoBall.transform.GetChild(0).GetChild(0)).gameObject.GetComponent()).enabled = false; } } SelectableLevel[] levels = __instance.levels; foreach (SelectableLevel val in levels) { switch (val.levelID) { case 2: val.videoReel = Assets.Valo1; break; case 3: val.videoReel = Assets.GordionClip; break; case 5: val.videoReel = Assets.OtherClip; break; case 7: val.videoReel = Assets.Valo2; break; case 9: val.videoReel = Assets.Planet; break; } Assets.PlanRarity.ApplySpawnRarity(val); Assets.SausageTicketRarity.ApplySpawnRarity(val); Assets.PCRarity.ApplySpawnRarity(val); Assets.CasqueRarity.ApplySpawnRarity(val); Assets.HandRarity.ApplySpawnRarity(val); Assets.KeyboardRarity.ApplySpawnRarity(val); Assets.KakahuetRarity.ApplySpawnRarity(val); Assets.MowerRarity.ApplySpawnRarity(val); Assets.ScreenRarity.ApplySpawnRarity(val); Assets.RouterRarity.ApplySpawnRarity(val); Assets.RavcamRarity.ApplySpawnRarity(val); Assets.TelephoneRarity.ApplySpawnRarity(val); Assets.LieDetectorRarity.ApplySpawnRarity(val); Assets.VacuumRarity.ApplySpawnRarity(val); Assets.CheeseRarity.ApplySpawnRarity(val); Assets.FluteRarity.ApplySpawnRarity(val); Assets.ChopstickRarity.ApplySpawnRarity(val); Assets.BolRarity.ApplySpawnRarity(val); Assets.BoosterRarity.ApplySpawnRarity(val); Assets.AtiRarity.ApplySpawnRarity(val); } RegisterItem(Assets.PlanAssassin, __instance); RegisterItem(Assets.Sausage, __instance); RegisterItem(Assets.PCRavix, __instance); RegisterItem(Assets.SausageTicket, __instance); RegisterItem(Assets.MicroKaquite, __instance); RegisterItem(Assets.LeftHeadsetItem, __instance); RegisterItem(Assets.RightHeadsetItem, __instance); RegisterItem(Assets.HandItem, __instance); RegisterItem(Assets.KeyboardItem, __instance); RegisterItem(Assets.KakahuetItem, __instance); RegisterItem(Assets.MowerItem, __instance); RegisterItem(Assets.ScreenItem, __instance); RegisterItem(Assets.RouterItem, __instance); RegisterItem(Assets.OysterItem, __instance); RegisterItem(Assets.RavcamItem, __instance); RegisterItem(Assets.TelephoneItem, __instance); RegisterItem(Assets.LieDetectorItem, __instance); RegisterItem(Assets.VacuumItem, __instance); RegisterItem(Assets.CheeseItem, __instance); RegisterItem(Assets.KkItem, __instance); RegisterItem(Assets.ChopstickItem, __instance); RegisterItem(Assets.FluteItem, __instance); RegisterItem(Assets.BolItem, __instance); RegisterItem(Assets.BoosterItem, __instance); RegisterItem(Assets.AtiItem, __instance); } private static void RegisterItem(Item item, StartOfRound manager) { if (!manager.allItemsList.itemsList.Contains(item)) { manager.allItemsList.itemsList.Add(item); } } } } namespace LCPlanAssassin.Items { public class AspiBehaviour : NoisemakerProp { private AudioSource itemAudio; private AudioSource loopSource; private Transform suckPoint; private bool isOn; private float lastUse; private readonly float suckForce = 6f; private readonly float suckRange = 8f; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); loopSource = ((Component)this).gameObject.AddComponent(); loopSource.volume = 1f; loopSource.spatialBlend = 1f; loopSource.dopplerLevel = 0.45f; loopSource.spread = 45f; loopSource.rolloffMode = (AudioRolloffMode)1; loopSource.minDistance = 3f; loopSource.maxDistance = 60f; loopSource.loop = true; loopSource.clip = Assets.VacuumLoopClip; suckPoint = ((Component)this).gameObject.transform.GetChild(2); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && !((double)Time.time - (double)lastUse < 5.0)) { lastUse = Time.time; UseItemServerRpc(); } } public override void Update() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = (((double)(Time.time - lastUse) >= 5.0) ? 0f : 10f); if (!isOn) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (Object.op_Implicit((Object)(object)localPlayerController) && localPlayerController.isPlayerControlled && !localPlayerController.isPlayerDead && (!Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) || localPlayerController.playerClientId != ((GrabbableObject)this).playerHeldBy.playerClientId)) { float num = Vector3.Distance(((Component)localPlayerController).transform.position, suckPoint.position); if (!(num > suckRange)) { Vector3 val = suckPoint.position - ((Component)localPlayerController).transform.position; Vector3 val2 = ((Vector3)(ref val)).normalized * (suckForce * (float)(1.0 - (double)(num / suckRange))); localPlayerController.externalForces += val2; } } } private IEnumerator StartVacuumCoroutine() { if (!isOn) { isOn = true; itemAudio.PlayOneShot(Assets.VacuumStartClip); yield return (object)new WaitForSeconds(Assets.VacuumStartClip.length - 0.2f); loopSource.Play(); loopSource.volume = 0f; float deltaTime = 0f; while ((double)deltaTime < 0.2) { loopSource.volume = deltaTime / 0.2f; deltaTime += Time.deltaTime; yield return null; } loopSource.volume = 1f; } } private IEnumerator StopVacuumCoroutine() { if (isOn) { isOn = false; itemAudio.volume = 0.5f; itemAudio.PlayOneShot(Assets.VacuumEndClip); loopSource.volume = 1f; float deltaTime = 0f; while ((double)deltaTime < 0.25) { loopSource.volume = (float)(1.0 - (double)deltaTime / 0.25); itemAudio.volume = Mathf.Lerp(0.5f, 1f, deltaTime / 0.25f); deltaTime += Time.deltaTime; yield return null; } loopSource.Stop(); loopSource.volume = 1f; itemAudio.volume = 1f; } } [ServerRpc(RequireOwnership = false)] private void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2950870372u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2950870372u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetStateClientRpc(!isOn); } } } [ClientRpc] private void SetStateClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3699694096u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3699694096u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(state ? StartVacuumCoroutine() : StopVacuumCoroutine()); } } } protected override void __initializeVariables() { ((NoisemakerProp)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(2950870372u, new RpcReceiveHandler(__rpc_handler_2950870372), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(3699694096u, new RpcReceiveHandler(__rpc_handler_3699694096), "SetStateClientRpc"); ((NoisemakerProp)this).__initializeRpcs(); } private static void __rpc_handler_2950870372(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; ((AspiBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3699694096(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 stateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AspiBehaviour)(object)target).SetStateClientRpc(stateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AspiBehaviour"; } } public class AtiBehaviour : GrabbableObject { private PlayerControllerB previousHolder; public override void GrabItem() { ((GrabbableObject)this).GrabItem(); if (Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead && base.playerHeldBy.isPlayerControlled && !((Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { if (!Object.op_Implicit((Object)(object)((Component)base.playerHeldBy).gameObject.GetComponent())) { ((Component)base.playerHeldBy).gameObject.AddComponent(); } LowFPSComponent component = ((Component)base.playerHeldBy).gameObject.GetComponent(); component.targetFPS = 10; ((MonoBehaviour)this).StartCoroutine(LowFPSCoroutine(component)); previousHolder = base.playerHeldBy; } } private IEnumerator LowFPSCoroutine(LowFPSComponent component) { yield return (object)new WaitForFixedUpdate(); component.SetActive(active: true); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); if (Object.op_Implicit((Object)(object)previousHolder) && !previousHolder.isPlayerDead && previousHolder.isPlayerControlled && !((Object)(object)previousHolder != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { LowFPSComponent component = ((Component)previousHolder).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetActive(active: false); previousHolder = null; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "AtiBehaviour"; } } public class BolBehaviour : GrabbableObject { private AudioSource source; public override void Start() { ((GrabbableObject)this).Start(); source = ((Component)this).gameObject.GetComponent(); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && !base.deactivated && buttonDown && base.isHeld && !((Object)(object)base.playerHeldBy == (Object)null)) { UseItemServerRpc(); } } public override void PlayDropSFX() { if (!((Behaviour)this).enabled) { base.hasHitGround = true; } else { ((GrabbableObject)this).PlayDropSFX(); } } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1859503350u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1859503350u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemClientRpc(); } } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1442989681u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1442989681u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; source.PlayOneShot(Assets.EatClip); PlayerControllerBPatch.SausageDict[base.playerHeldBy.playerClientId] = Time.time; if ((Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { AddShieldServerRpc((int)base.playerHeldBy.playerClientId); HUDManager.Instance.DisplayTip("Shield", "Vous avez un bouclier en plus", false, false, "LC_Tip1"); } ((Behaviour)this).enabled = false; ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } } [ServerRpc(RequireOwnership = false)] public void AddShieldServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1324677713u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1324677713u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AddShieldClientRpc(playerId); } } } [ClientRpc] public void AddShieldClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2802635675u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2802635675u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (PlayerControllerBPatch.ShieldDict.ContainsKey((ulong)playerId)) { PlayerControllerBPatch.ShieldDict[(ulong)playerId]++; } else { PlayerControllerBPatch.ShieldDict.Add((ulong)playerId, 1); } } } protected override void __initializeVariables() { ((GrabbableObject)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(1859503350u, new RpcReceiveHandler(__rpc_handler_1859503350), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1442989681u, new RpcReceiveHandler(__rpc_handler_1442989681), "UseItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(1324677713u, new RpcReceiveHandler(__rpc_handler_1324677713), "AddShieldServerRpc"); ((NetworkBehaviour)this).__registerRpc(2802635675u, new RpcReceiveHandler(__rpc_handler_2802635675), "AddShieldClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1859503350(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; ((BolBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1442989681(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; ((BolBehaviour)(object)target).UseItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1324677713(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; ((BolBehaviour)(object)target).AddShieldServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2802635675(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; ((BolBehaviour)(object)target).AddShieldClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BolBehaviour"; } } public class BoosterBehaviour : GrabbableObject { private AudioSource audioSource; public bool active; public float fuel = 100f; public float power = 1f; public bool broken; private Vector3 force = Vector3.zero; private readonly float acceleration = 10f; public override void Start() { ((GrabbableObject)this).Start(); audioSource = ((Component)this).GetComponent(); audioSource.loop = true; } public override void Update() { //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_00a6: 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_00c1: 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) //IL_012e: 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_01b5: 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_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner) { return; } if ((double)fuel <= 0.0) { if (active) { ActivateBoosterServerRpc(activate: false); } } else if (!((Object)(object)base.playerHeldBy == (Object)null)) { if (active) { power = Mathf.Clamp(power + Time.deltaTime * acceleration, 1f, 100f); force = Vector3.Lerp(force, ((Component)base.playerHeldBy).transform.up * power, Time.deltaTime * acceleration); fuel -= Time.deltaTime * (power / 5f); } else { power = 0f; force = Vector3.zero; } RaycastHit val = default(RaycastHit); if (!base.playerHeldBy.isPlayerDead && Physics.Raycast(((Component)base.playerHeldBy).transform.position, force, ref val, 25f, StartOfRound.Instance.allPlayersCollideWithMask, (QueryTriggerInteraction)1) && (double)(((Vector3)(ref force)).magnitude - ((RaycastHit)(ref val)).distance) > 50.0 && (double)((RaycastHit)(ref val)).distance < 4.0) { base.playerHeldBy.KillPlayer(force, true, (CauseOfDeath)16, 0, default(Vector3), false); } PlayerControllerB playerHeldBy = base.playerHeldBy; playerHeldBy.externalForces += force; } } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); if (active) { ActivateBoosterServerRpc(activate: false); audioSource.Stop(); ExplodeBoosterServerRpc(); } } public override void DiscardItem() { if (((NetworkBehaviour)this).IsOwner && base.playerHeldBy.isPlayerDead && !broken && base.playerHeldBy.jetpackControls) { ActivateBoosterServerRpc(activate: false); ExplodeBoosterServerRpc(); } if (base.playerHeldBy.jetpackControls) { base.playerHeldBy.disablingJetpackControls = true; } ((GrabbableObject)this).DiscardItem(); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && ((Behaviour)this).enabled && StartOfRound.Instance.shipHasLanded) { if (broken) { UseBrokenServerRpc(); } else { ActivateBoosterServerRpc(activate: true); } } } [ServerRpc(RequireOwnership = false)] public void ActivateBoosterServerRpc(bool activate) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3723853076u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref activate, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3723853076u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!broken) { if ((double)fuel <= 0.0) { activate = false; } ActivateBoosterClientRpc(activate); } } [ClientRpc] public void ActivateBoosterClientRpc(bool activate) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_013d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1457532584u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref activate, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1457532584u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; active = activate; base.playerHeldBy.disablingJetpackControls = !active; if (!active) { audioSource.Stop(); return; } base.playerHeldBy.jetpackControls = true; base.playerHeldBy.syncFullRotation = ((Component)base.playerHeldBy).transform.eulerAngles; audioSource.PlayOneShot(Assets.JetPackThrustStart); audioSource.Play(); } } [ServerRpc(RequireOwnership = false)] public void ExplodeBoosterServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1032996413u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1032996413u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!broken && !((double)fuel <= 0.0)) { ExplodeBoosterClientRpc(); } } } [ClientRpc] public void ExplodeBoosterClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1037012854u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1037012854u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; broken = true; fuel = 0f; audioSource.Stop(); ((GrabbableObject)this).SetScrapValue(base.scrapValue / 5); Landmine.SpawnExplosion(((Component)this).transform.position, true, 2f, 5f, 50, 5f, (GameObject)null, false); } } } [ServerRpc(RequireOwnership = false)] public void UseBrokenServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(634672759u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 634672759u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseBrokenClientRpc(); } } } [ClientRpc] public void UseBrokenClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2266048005u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2266048005u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; audioSource.PlayOneShot(Assets.JetpackBroken); } } } protected override void __initializeVariables() { ((GrabbableObject)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(3723853076u, new RpcReceiveHandler(__rpc_handler_3723853076), "ActivateBoosterServerRpc"); ((NetworkBehaviour)this).__registerRpc(1457532584u, new RpcReceiveHandler(__rpc_handler_1457532584), "ActivateBoosterClientRpc"); ((NetworkBehaviour)this).__registerRpc(1032996413u, new RpcReceiveHandler(__rpc_handler_1032996413), "ExplodeBoosterServerRpc"); ((NetworkBehaviour)this).__registerRpc(1037012854u, new RpcReceiveHandler(__rpc_handler_1037012854), "ExplodeBoosterClientRpc"); ((NetworkBehaviour)this).__registerRpc(634672759u, new RpcReceiveHandler(__rpc_handler_634672759), "UseBrokenServerRpc"); ((NetworkBehaviour)this).__registerRpc(2266048005u, new RpcReceiveHandler(__rpc_handler_2266048005), "UseBrokenClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3723853076(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 activate = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref activate, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BoosterBehaviour)(object)target).ActivateBoosterServerRpc(activate); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1457532584(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 activate = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref activate, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BoosterBehaviour)(object)target).ActivateBoosterClientRpc(activate); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1032996413(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; ((BoosterBehaviour)(object)target).ExplodeBoosterServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1037012854(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; ((BoosterBehaviour)(object)target).ExplodeBoosterClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_634672759(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; ((BoosterBehaviour)(object)target).UseBrokenServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2266048005(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; ((BoosterBehaviour)(object)target).UseBrokenClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BoosterBehaviour"; } } public class CasqueBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastTimeUsed; private AudioDistortionFilter distortionFilter; private float breakChance = 5f; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); distortionFilter = ((Component)this).gameObject.AddComponent(); distortionFilter.distortionLevel = 0.75f; } public override void ItemActivate(bool used, bool buttonDown = true) { if (!buttonDown || !((NetworkBehaviour)this).IsOwner || (double)(Time.time - lastTimeUsed) < 3.0 || ((GrabbableObject)this).deactivated) { return; } if (Random.Range(0f, 100f) <= breakChance && StartOfRound.Instance.shipHasLanded) { BreakServerRpc(); if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { ItemDropServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } } else { lastTimeUsed = Time.time; PlayRandomSoundServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((Time.time - lastTimeUsed >= 3f) ? 0f : 10f); } public override void GrabItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemGrabServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } distortionFilter.distortionLevel = 0.75f; ((GrabbableObject)this).GrabItem(); } public override void DiscardItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemDropServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } distortionFilter.distortionLevel = 0f; ((GrabbableObject)this).DiscardItem(); } public void PlaySoundLocal(int soundId) { itemAudio.PlayOneShot(Assets.KaquiteClips[soundId]); } private bool IsAnyCasqueInInventory(PlayerControllerB player, bool grab) { return player.ItemSlots.Any((GrabbableObject item) => (item is CasqueBehaviour && (Object)(object)item != (Object)(object)this) || grab); } public void ItemGrabLocal(ulong playerWhoGrabbed) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoGrabbed) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoGrabbed) { SetPlayerDistortion(val, IsAnyCasqueInInventory(val, grab: true) ? 0.8f : 0f); } } } public void ItemDropLocal(ulong playerWhoDropped) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoDropped) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoDropped) { SetPlayerDistortion(val, IsAnyCasqueInInventory(val, grab: false) ? 0.8f : 0f); } } } private static void SetPlayerDistortion(PlayerControllerB player, float distortionLevel) { AudioDistortionFilter filterForPlayer = PlayerDistortionManager.GetFilterForPlayer(player); if (Object.op_Implicit((Object)(object)filterForPlayer)) { filterForPlayer.distortionLevel = distortionLevel; } } [ServerRpc(RequireOwnership = false)] public void PlayRandomSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3032412797u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3032412797u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 25f, 0.9f, 0, false, 0); int soundId = Random.Range(0, Assets.KaquiteClips.Count); if (!((NetworkBehaviour)this).IsHost) { PlaySoundLocal(soundId); } PlaySoundClientRpc(soundId); } } [ClientRpc] public void PlaySoundClientRpc(int soundId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1612812337u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, soundId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1612812337u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlaySoundLocal(soundId); } } } [ServerRpc(RequireOwnership = false)] public void ItemGrabServerRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3726082168u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3726082168u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { ItemGrabLocal(playerWhoGrabbed); } ItemGrabClientRpc(playerWhoGrabbed); } } [ClientRpc] public void ItemGrabClientRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1583903099u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1583903099u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ItemGrabLocal(playerWhoGrabbed); } } } [ServerRpc(RequireOwnership = false)] public void ItemDropServerRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1507338783u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoDropped); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1507338783u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { ItemDropLocal(playerWhoDropped); } ItemDropClientRpc(playerWhoDropped); } } [ClientRpc] public void ItemDropClientRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3140763079u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoDropped); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3140763079u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ItemDropLocal(playerWhoDropped); } } } private void SpawnItem(Item item, Vector3 deltaPos) { //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(item.spawnPrefab, ((Component)this).transform.position + deltaPos, Quaternion.identity); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; val.GetComponent().Spawn(false); component.FallToGround(true, true, default(Vector3)); component.SetScrapValue(((GrabbableObject)this).scrapValue / 2); } [ServerRpc(RequireOwnership = false)] public void BreakServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_0129: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1848940189u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1848940189u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0.25f, 0f, 0f); if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && !((GrabbableObject)this).playerHeldBy.isPlayerDead && ((GrabbableObject)this).playerHeldBy.isPlayerControlled) { val3 = ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.right; ((Vector3)(ref val3)).Normalize(); val3 *= 0.25f; } SpawnItem(Assets.LeftHeadsetItem, val3); SpawnItem(Assets.RightHeadsetItem, -val3); BreakClientRpc(); } } [ClientRpc] public void BreakClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(301355523u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 301355523u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((GrabbableObject)this).deactivated = true; itemAudio.Stop(); ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3032412797u, new RpcReceiveHandler(__rpc_handler_3032412797), "PlayRandomSoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(1612812337u, new RpcReceiveHandler(__rpc_handler_1612812337), "PlaySoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(3726082168u, new RpcReceiveHandler(__rpc_handler_3726082168), "ItemGrabServerRpc"); ((NetworkBehaviour)this).__registerRpc(1583903099u, new RpcReceiveHandler(__rpc_handler_1583903099), "ItemGrabClientRpc"); ((NetworkBehaviour)this).__registerRpc(1507338783u, new RpcReceiveHandler(__rpc_handler_1507338783), "ItemDropServerRpc"); ((NetworkBehaviour)this).__registerRpc(3140763079u, new RpcReceiveHandler(__rpc_handler_3140763079), "ItemDropClientRpc"); ((NetworkBehaviour)this).__registerRpc(1848940189u, new RpcReceiveHandler(__rpc_handler_1848940189), "BreakServerRpc"); ((NetworkBehaviour)this).__registerRpc(301355523u, new RpcReceiveHandler(__rpc_handler_301355523), "BreakClientRpc"); ((NoisemakerProp)this).__initializeRpcs(); } private static void __rpc_handler_3032412797(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; ((CasqueBehaviour)(object)target).PlayRandomSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1612812337(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 soundId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundId); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).PlaySoundClientRpc(soundId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3726082168(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) { ulong playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemGrabServerRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1583903099(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) { ulong playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemGrabClientRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1507338783(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) { ulong playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemDropServerRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3140763079(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) { ulong playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemDropClientRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1848940189(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; ((CasqueBehaviour)(object)target).BreakServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_301355523(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; ((CasqueBehaviour)(object)target).BreakClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CasqueBehaviour"; } } public class CheeseBehaviour : GrabbableObject { private AudioSource itemAudio; public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!base.deactivated && buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && ((NetworkBehaviour)this).IsOwner) { UseItemServerRpc(); } } public override void PlayDropSFX() { if (!((Behaviour)this).enabled) { base.hasHitGround = true; } else { ((GrabbableObject)this).PlayDropSFX(); } } private void UseItemLocal() { if (!((Object)(object)base.playerHeldBy == (Object)null)) { itemAudio.PlayOneShot(Assets.EatClip); if (Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead) { ((Component)base.playerHeldBy).gameObject.AddComponent(); } ((Behaviour)this).enabled = false; ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2619836176u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2619836176u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 17f, 0.3f, 0, base.isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((NetworkBehaviour)this).IsHost) { UseItemLocal(); } UseItemClientRpc(); } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1795174132u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1795174132u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemLocal(); } } } protected override void __initializeVariables() { ((GrabbableObject)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(2619836176u, new RpcReceiveHandler(__rpc_handler_2619836176), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1795174132u, new RpcReceiveHandler(__rpc_handler_1795174132), "UseItemClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2619836176(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; ((CheeseBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1795174132(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; ((CheeseBehaviour)(object)target).UseItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CheeseBehaviour"; } } public class ChopstickBehaviour : GrabbableObject { private float lastUseTime; private AudioSource source; public override void Start() { ((GrabbableObject)this).Start(); source = ((Component)this).gameObject.GetComponent(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (Object.op_Implicit((Object)(object)base.playerHeldBy) && buttonDown && ((Behaviour)this).enabled && !((double)Time.time - (double)lastUseTime < 0.5)) { lastUseTime = Time.time - 0.45f; UseItemServerRpc(); } } public override void PlayDropSFX() { if (!((Behaviour)this).enabled) { base.hasHitGround = true; } else { ((GrabbableObject)this).PlayDropSFX(); } } [ServerRpc(RequireOwnership = false)] private void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1814202545u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1814202545u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)base.playerHeldBy == (Object)null || base.playerHeldBy.isPlayerDead || !base.playerHeldBy.isPlayerControlled) { return; } RaycastHit[] array = Physics.SphereCastAll(((Component)base.playerHeldBy.gameplayCamera).transform.position + ((Component)base.playerHeldBy.gameplayCamera).transform.right * -0.35f, 1.5f, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, 1.5f, 1084754248, (QueryTriggerInteraction)2); PlayerControllerB val3 = null; EnemyAI val4 = null; RaycastHit[] array2 = array; IHittable val6 = default(IHittable); RaycastHit val7 = default(RaycastHit); for (int i = 0; i < array2.Length; i++) { RaycastHit val5 = array2[i]; if (((Component)((RaycastHit)(ref val5)).transform).TryGetComponent(ref val6) && !((Object)(object)((RaycastHit)(ref val5)).transform == (Object)(object)((Component)base.playerHeldBy).transform) && (!(((RaycastHit)(ref val5)).point != Vector3.zero) || !Physics.Linecast(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((RaycastHit)(ref val5)).point, ref val7, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))) { ModBase.Instance.logger.LogDebug((object)"Hit something"); EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val5)).collider).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.mainScript != (Object)null) { ModBase.Instance.logger.LogDebug((object)("Hit enemy of type " + ((object)component.mainScript).GetType())); } if ((Object)(object)component != (Object)null && (Object)(object)component.mainScript != (Object)null && (((object)component.mainScript).GetType() == typeof(MouthDogAI) || ((object)component.mainScript).GetType() == typeof(CaveDwellerAI) || ((object)component.mainScript).GetType() == typeof(RedLocustBees))) { val4 = component.mainScript; break; } if ((Object)(object)((Component)((RaycastHit)(ref val5)).transform).GetComponent() != (Object)null && !((Component)((RaycastHit)(ref val5)).transform).GetComponent().isPlayerDead && ((Component)((RaycastHit)(ref val5)).transform).GetComponent().isPlayerControlled && (Object)(object)val3 == (Object)null && (Object)(object)((RaycastHit)(ref val5)).transform != (Object)(object)((Component)base.playerHeldBy).transform) { val3 = ((Component)((RaycastHit)(ref val5)).transform).GetComponent(); } } } bool flag = false; bool flag2 = false; if ((Object)(object)val4 != (Object)null) { if (((object)val4).GetType() == typeof(MouthDogAI)) { val4.KillEnemy(true); flag = true; } else if (((object)val4).GetType() == typeof(CaveDwellerAI)) { ((Component)val4).GetComponent().Despawn(true); flag = true; } else if (((object)val4).GetType() == typeof(RedLocustBees)) { val4.KillEnemy(true); Networker instance = Networker.Instance; if (instance != null) { instance.DamagePlayerServerRpc((int)base.playerHeldBy.playerClientId, 20, default(Vector3), (CauseOfDeath)11); } int num = Random.Range(0, 100); if (num <= 65) { DestroyItemClientRpc(); } else if (num <= 70) { DestroyAndExplodeClientRpc(); } flag = true; } } if ((Object)(object)val3 != (Object)null && !flag) { flag2 = true; } if (flag2 || flag) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 17f, 0.3f, 0, base.isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); UseItemClientRpc(((Object)(object)val3 == (Object)null || flag) ? 0 : val3.playerClientId); } } [ClientRpc] private void UseItemClientRpc(ulong playerToHit = 0uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_0106: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(987935469u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerToHit); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 987935469u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (playerToHit != 0) { StartOfRound.Instance.allPlayerScripts[playerToHit].DamagePlayer(10, true, true, (CauseOfDeath)6, 0, false, ((Component)base.playerHeldBy).transform.up * 2f); } source.PlayOneShot(Assets.EatClip); lastUseTime = Time.time; } } [ClientRpc] private void DestroyAndExplodeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_0129: 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_0139: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3723906673u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3723906673u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Landmine.SpawnExplosion(((Component)this).transform.position, true, 0f, 0f, 50, 0f, (GameObject)null, false); if (Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead && base.playerHeldBy.isPlayerControlled) { base.playerHeldBy.KillPlayer(((Component)base.playerHeldBy).transform.up, true, (CauseOfDeath)3, 0, default(Vector3), false); } DestroyItemClientRpc(); } } [ClientRpc] private void DestroyItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(562229207u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 562229207u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((Behaviour)this).enabled = false; ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } } } protected override void __initializeVariables() { ((GrabbableObject)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(1814202545u, new RpcReceiveHandler(__rpc_handler_1814202545), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(987935469u, new RpcReceiveHandler(__rpc_handler_987935469), "UseItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(3723906673u, new RpcReceiveHandler(__rpc_handler_3723906673), "DestroyAndExplodeClientRpc"); ((NetworkBehaviour)this).__registerRpc(562229207u, new RpcReceiveHandler(__rpc_handler_562229207), "DestroyItemClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1814202545(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; ((ChopstickBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_987935469(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) { ulong playerToHit = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerToHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((ChopstickBehaviour)(object)target).UseItemClientRpc(playerToHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3723906673(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; ((ChopstickBehaviour)(object)target).DestroyAndExplodeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_562229207(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; ((ChopstickBehaviour)(object)target).DestroyItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ChopstickBehaviour"; } } public class FluteBehaviour : GrabbableObject { private static readonly int UseTzpItem = Animator.StringToHash("useTZPItem"); private bool inUse = false; private float timeUsing = 0f; private AudioSource source; private PlayerControllerB previousPlayerHeldBy; public override void Start() { ((GrabbableObject)this).Start(); source = ((Component)this).gameObject.GetComponent(); } public override void Update() { ((GrabbableObject)this).Update(); if (!((double)(Time.time - timeUsing) < 0.5) && inUse && !((Object)(object)source == (Object)null) && !source.isPlaying) { source.PlayOneShot(Assets.FluteClip); } } public override void DiscardItem() { if (((NetworkBehaviour)this).IsOwner && inUse) { UseItemServerRpc(activate: false); } previousPlayerHeldBy.playerBodyAnimator.SetBool(UseTzpItem, false); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); if (((NetworkBehaviour)this).IsOwner && inUse) { UseItemServerRpc(activate: false); } previousPlayerHeldBy.playerBodyAnimator.SetBool(UseTzpItem, false); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); if (Object.op_Implicit((Object)(object)base.playerHeldBy)) { previousPlayerHeldBy = base.playerHeldBy; } } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner) { UseItemServerRpc(buttonDown); if (((NetworkBehaviour)this).IsOwner) { previousPlayerHeldBy.playerBodyAnimator.SetBool(UseTzpItem, buttonDown); } } } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc(bool activate) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1710378973u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref activate, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1710378973u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemClientRpc(activate); } } } [ClientRpc] public void UseItemClientRpc(bool activate) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4152008418u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref activate, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4152008418u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (activate && !inUse) { inUse = true; timeUsing = Time.time; } else if (!activate && inUse) { inUse = false; source.Stop(); } } } protected override void __initializeVariables() { ((GrabbableObject)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(1710378973u, new RpcReceiveHandler(__rpc_handler_1710378973), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(4152008418u, new RpcReceiveHandler(__rpc_handler_4152008418), "UseItemClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1710378973(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 activate = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref activate, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FluteBehaviour)(object)target).UseItemServerRpc(activate); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4152008418(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 activate = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref activate, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FluteBehaviour)(object)target).UseItemClientRpc(activate); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FluteBehaviour"; } } public class HandBehaviour : NoisemakerProp { public static AudioClip RiseSfx; public static AudioClip FunnySfx; public static AudioClip DownSfx; private AudioSource itemAudio; private Animator animator; private bool raised; private bool doFunny; private float activationTime; private static readonly int IsGoingUp = Animator.StringToHash("isGoingUp"); private static readonly int DoFunny = Animator.StringToHash("doFunny"); public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); animator = ((Component)this).gameObject.GetComponentInChildren(); activationTime = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (!((NetworkBehaviour)this).IsOwner || !buttonDown || (double)(Time.time - activationTime) < 3.0) { return; } activationTime = Time.time; if (!raised) { raised = true; RaiseServerRpc(); } else if (Random.Range(0, 2) == 0) { if (!doFunny) { doFunny = true; FunnyServerRpc(); } } else { raised = false; DownServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = (((double)(Time.time - activationTime) >= 3.0) ? 0f : 10f); } public void RaiseLocal() { raised = true; itemAudio.PlayOneShot(RiseSfx, 0.5f); animator.SetBool(IsGoingUp, true); } public void DoFunnyLocal() { doFunny = true; itemAudio.PlayOneShot(FunnySfx, 0.5f); animator.SetBool(DoFunny, true); ((MonoBehaviour)this).StartCoroutine(FunnyCoroutine()); } private IEnumerator FunnyCoroutine() { yield return null; yield return (object)new WaitForSeconds(1f); doFunny = false; animator.SetBool(DoFunny, false); } public void DownLocal() { if (doFunny) { doFunny = false; animator.SetBool(DoFunny, false); } raised = false; itemAudio.PlayOneShot(DownSfx, 0.5f); animator.SetBool(IsGoingUp, false); } [ServerRpc(RequireOwnership = false)] public void RaiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3596734070u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3596734070u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RaiseClientRpc(); } } } [ClientRpc] public void RaiseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3694110718u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3694110718u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RaiseLocal(); } } } [ServerRpc(RequireOwnership = false)] public void FunnyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2903330174u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2903330174u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; FunnyClientRpc(); } } } [ClientRpc] public void FunnyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1174699336u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1174699336u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoFunnyLocal(); } } } [ServerRpc(RequireOwnership = false)] public void DownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(472768968u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 472768968u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DownClientRpc(); } } } [ClientRpc] public void DownClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2512040063u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2512040063u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DownLocal(); } } } protected override void __initializeVariables() { ((NoisemakerProp)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(3596734070u, new RpcReceiveHandler(__rpc_handler_3596734070), "RaiseServerRpc"); ((NetworkBehaviour)this).__registerRpc(3694110718u, new RpcReceiveHandler(__rpc_handler_3694110718), "RaiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2903330174u, new RpcReceiveHandler(__rpc_handler_2903330174), "FunnyServerRpc"); ((NetworkBehaviour)this).__registerRpc(1174699336u, new RpcReceiveHandler(__rpc_handler_1174699336), "FunnyClientRpc"); ((NetworkBehaviour)this).__registerRpc(472768968u, new RpcReceiveHandler(__rpc_handler_472768968), "DownServerRpc"); ((NetworkBehaviour)this).__registerRpc(2512040063u, new RpcReceiveHandler(__rpc_handler_2512040063), "DownClientRpc"); ((NoisemakerProp)this).__initializeRpcs(); } private static void __rpc_handler_3596734070(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; ((HandBehaviour)(object)target).RaiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3694110718(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; ((HandBehaviour)(object)target).RaiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2903330174(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; ((HandBehaviour)(object)target).FunnyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1174699336(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; ((HandBehaviour)(object)target).FunnyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_472768968(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; ((HandBehaviour)(object)target).DownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2512040063(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; ((HandBehaviour)(object)target).DownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HandBehaviour"; } } public class KakahuetBehaviour : PhysicsProp { private AnimationCurve fallCurve; private AnimationCurve verticalFallCurveNoBounce; private AnimationCurve verticalFallCurve; public void Awake() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_008d: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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) //IL_00e1: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown fallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0.5f, 0f) }); verticalFallCurveNoBounce = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, 0f, 0.2f, 1f), new Keyframe(1f, 1f) }); verticalFallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, -2f, 0.3f, 0.3f), new Keyframe(0.75f, 1f, 2f, -2f, 0.1f, 0.1f), new Keyframe(1f, 1f, 2f, 0f, 0.05f, 0f) }); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner) { ((GrabbableObject)this).playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetThrowDestination(), true); } } public override void FallWithCurve() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_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_00d8: 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_00fe: 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_013e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((GrabbableObject)this).startFallingPosition - ((GrabbableObject)this).targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(((GrabbableObject)this).itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, ((GrabbableObject)this).itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(((GrabbableObject)this).startFallingPosition, ((GrabbableObject)this).targetFloorPosition, fallCurve.Evaluate(((GrabbableObject)this).fallTime)); ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), ((double)magnitude > 5.0) ? verticalFallCurveNoBounce.Evaluate(((GrabbableObject)this).fallTime) : verticalFallCurve.Evaluate(((GrabbableObject)this).fallTime)); ((GrabbableObject)this).fallTime = ((GrabbableObject)this).fallTime + Mathf.Abs(Time.deltaTime * 12f / magnitude); } private Vector3 GetThrowDestination() { //IL_0013: 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_0032: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_006d: 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_00b0: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position, ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward); RaycastHit val3 = default(RaycastHit); Vector3 val2 = ((!Physics.Raycast(val, ref val3, 12f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(10f) : ((Ray)(ref val)).GetPoint(((RaycastHit)(ref val3)).distance - 0.05f)); ((Ray)(ref val))..ctor(val2, Vector3.down); return (!Physics.Raycast(val, ref val3, 30f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(30f) : (((RaycastHit)(ref val3)).point + Vector3.up * 0.05f); } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "KakahuetBehaviour"; } } public class KeyboardBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastUse; private float lastEmit; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); lastUse = Time.time; lastEmit = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && !((double)(Time.time - lastUse) <= 5.0)) { lastUse = Time.time; UseServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = (((double)Time.time - (double)lastUse > 5.0) ? 0f : 10f); if (((NetworkBehaviour)this).IsOwner && itemAudio.isPlaying && !((double)Time.time - (double)lastEmit <= 1.0) && !((double)Time.time - (double)lastUse <= 1.0) && !((double)Time.time - (double)lastUse > 5.0)) { lastEmit = Time.time; EmitNoiseServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void UseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1881184228u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1881184228u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, 0.85f, 0, false, 0); UseClientRpc(Random.Range(0, Assets.KeyboardClips.Count)); } } } [ClientRpc] public void UseClientRpc(int indexClip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1482408506u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, indexClip); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1482408506u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; itemAudio.PlayOneShot(Assets.KeyboardClips[indexClip]); } } } [ServerRpc] public void EmitNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1927208663u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1927208663u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, 0.85f, 0, false, 0); } } protected override void __initializeVariables() { ((NoisemakerProp)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(1881184228u, new RpcReceiveHandler(__rpc_handler_1881184228), "UseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1482408506u, new RpcReceiveHandler(__rpc_handler_1482408506), "UseClientRpc"); ((NetworkBehaviour)this).__registerRpc(1927208663u, new RpcReceiveHandler(__rpc_handler_1927208663), "EmitNoiseServerRpc"); ((NoisemakerProp)this).__initializeRpcs(); } private static void __rpc_handler_1881184228(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; ((KeyboardBehaviour)(object)target).UseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1482408506(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 indexClip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref indexClip); target.__rpc_exec_stage = (__RpcExecStage)1; ((KeyboardBehaviour)(object)target).UseClientRpc(indexClip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1927208663(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((KeyboardBehaviour)(object)target).EmitNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KeyboardBehaviour"; } } public class KkBehaviour : GrabbableObject { private AnimationCurve fallCurve; private AnimationCurve verticalFallCurveNoBounce; private AnimationCurve verticalFallCurve; public void Awake() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_008d: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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) //IL_00e1: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown fallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0.5f, 0f) }); verticalFallCurveNoBounce = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, 0f, 0.2f, 1f), new Keyframe(1f, 1f) }); verticalFallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, -2f, 0.3f, 0.3f), new Keyframe(0.75f, 1f, 2f, -2f, 0.1f, 0.1f), new Keyframe(1f, 1f, 2f, 0f, 0.05f, 0f) }); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner) { base.playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetThrowDestination(), true); } } public override void FallWithCurve() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_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_00d8: 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_00fe: 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_013e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = base.startFallingPosition - base.targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(base.startFallingPosition, base.targetFloorPosition, fallCurve.Evaluate(base.fallTime)); ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, base.startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, base.targetFloorPosition.y, ((Component)this).transform.localPosition.z), ((double)magnitude > 5.0) ? verticalFallCurveNoBounce.Evaluate(base.fallTime) : verticalFallCurve.Evaluate(base.fallTime)); base.fallTime += Mathf.Abs(Time.deltaTime * 12f / magnitude); } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); if (((NetworkBehaviour)this).IsOwner) { ExplodeServerRpc(Random.Range(0, 30) == 0); } } private Vector3 GetThrowDestination() { //IL_0013: 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_0032: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_006d: 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_00b0: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward); RaycastHit val3 = default(RaycastHit); Vector3 val2 = ((!Physics.Raycast(val, ref val3, 12f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(10f) : ((Ray)(ref val)).GetPoint(((RaycastHit)(ref val3)).distance - 0.05f)); ((Ray)(ref val))..ctor(val2, Vector3.down); return (!Physics.Raycast(val, ref val3, 30f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(30f) : (((RaycastHit)(ref val3)).point + Vector3.up * 0.05f); } [ServerRpc] private void ExplodeServerRpc(bool destroy) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1354726086u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref destroy, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1354726086u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ExplodeClientRpc(destroy); } } [ClientRpc] private void ExplodeClientRpc(bool destroy) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2041348253u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref destroy, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2041348253u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!destroy) { Landmine.SpawnExplosion(((Component)this).transform.position, false, 0f, 0f, 0, 5f, (GameObject)null, false); return; } Landmine.SpawnExplosion(((Component)this).transform.position, true, 0.4f, 2f, 40, 20f, (GameObject)null, false); ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } } protected override void __initializeVariables() { ((GrabbableObject)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(1354726086u, new RpcReceiveHandler(__rpc_handler_1354726086), "ExplodeServerRpc"); ((NetworkBehaviour)this).__registerRpc(2041348253u, new RpcReceiveHandler(__rpc_handler_2041348253), "ExplodeClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1354726086(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { bool destroy = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroy, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KkBehaviour)(object)target).ExplodeServerRpc(destroy); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2041348253(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 destroy = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroy, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KkBehaviour)(object)target).ExplodeClientRpc(destroy); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KkBehaviour"; } } public class LieDetectorBehaviour : GrabbableObject { private MeshRenderer renderer; private AudioSource audioSource; private float lastDetect; private bool isPlaying; private float lastPlayerSpeak; private bool hasActivated; public override void Start() { ((GrabbableObject)this).Start(); renderer = ((Component)this).gameObject.GetComponentInChildren(); audioSource = ((Component)this).gameObject.GetComponent(); } public override void Update() { ((GrabbableObject)this).Update(); if (CanLocalPlayerActivateItem()) { UpdatePlayerVoiceStatus(); if (!((double)Time.time - (double)lastPlayerSpeak <= 0.5) && !isPlaying && !hasActivated && base.heldByPlayerOnServer) { DetectLieServerRpc(); hasActivated = true; } } } private bool CanLocalPlayerActivateItem() { //IL_0031: 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_0059: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; return (Object)(object)localPlayerController != (Object)null && !localPlayerController.isPlayerDead && ((Object)(object)base.playerHeldBy == (Object)(object)localPlayerController || (double)Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)this).transform.position) < 6.0 || localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position, 360f, 15, -1f, -1)); } private void UpdatePlayerVoiceStatus() { if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || GameNetworkManager.Instance.localPlayerController.isPlayerDead || (Object)(object)StartOfRound.Instance.voiceChatModule == (Object)null) { return; } DissonanceComms voiceChatModule = StartOfRound.Instance.voiceChatModule; if (!voiceChatModule.IsMuted && ((Behaviour)voiceChatModule).enabled) { VoicePlayerState val = voiceChatModule.FindPlayer(voiceChatModule.LocalPlayerName); if (val != null && val.IsSpeaking && !(val.Amplitude <= 0.1f)) { lastPlayerSpeak = Time.time; hasActivated = false; } } } private void SetMat(bool on, bool lie) { Material[] materials = ((Renderer)renderer).materials; materials[1] = ((!on) ? Assets.ScreenOffMat : (lie ? Assets.WrongMat : Assets.RightMat)); ((Renderer)renderer).materials = materials; } private IEnumerator DetectLieCoroutine(bool lie) { if (!isPlaying) { isPlaying = true; AudioClip clip = (lie ? Assets.WrongClip : Assets.RightClip); SetMat(on: true, lie); audioSource.PlayOneShot(clip); yield return (object)new WaitForSeconds(clip.length + 0.3f); SetMat(on: false, lie); isPlaying = false; } } [ServerRpc(RequireOwnership = false)] private void DetectLieServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3354180293u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3354180293u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((double)Time.time - (double)lastDetect < 1.5)) { lastDetect = Time.time; DetectLieClientRpc((double)Random.value < 0.5); } } } [ClientRpc] private void DetectLieClientRpc(bool lie) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1608259601u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref lie, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1608259601u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DetectLieCoroutine(lie)); } } } protected override void __initializeVariables() { ((GrabbableObject)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(3354180293u, new RpcReceiveHandler(__rpc_handler_3354180293), "DetectLieServerRpc"); ((NetworkBehaviour)this).__registerRpc(1608259601u, new RpcReceiveHandler(__rpc_handler_1608259601), "DetectLieClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3354180293(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; ((LieDetectorBehaviour)(object)target).DetectLieServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1608259601(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 lie = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lie, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LieDetectorBehaviour)(object)target).DetectLieClientRpc(lie); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LieDetectorBehaviour"; } } public class MowerBehaviour : PhysicsProp { private AudioSource itemAudio; private AudioSource stopAudio; private BoxCollider bladeCollider; private float mowerCooldown; private float lastSound; private bool state; private float previousYAngle; private bool wasHeld; private float lastHitCheck; private Coroutine soundCoroutine; private List damagedPlayers = new List(); public override void Start() { ((GrabbableObject)this).Start(); ((GrabbableObject)this).floorYRot = -1; itemAudio = ((Component)this).gameObject.GetComponent(); stopAudio = ((Component)this).gameObject.AddComponent(); stopAudio.spatialBlend = 1f; stopAudio.dopplerLevel = 0.3f; stopAudio.spread = 45f; stopAudio.rolloffMode = (AudioRolloffMode)1; stopAudio.minDistance = 4f; stopAudio.maxDistance = 20f; mowerCooldown = Time.time; lastSound = Time.time; lastHitCheck = Time.time; bladeCollider = ((Component)((Component)this).gameObject.transform.GetChild(2)).gameObject.GetComponent(); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && !((double)Time.time - (double)mowerCooldown <= 3.0)) { mowerCooldown = Time.time; UseItemServerRpc(); } } public override void Update() { //IL_007a: 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) ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner || !state) { return; } if (((GrabbableObject)this).isHeld && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && ((NetworkBehaviour)((GrabbableObject)this).playerHeldBy).IsOwner) { if (wasHeld) { ((GrabbableObject)this).playerHeldBy.fallValue = Mathf.Clamp(((GrabbableObject)this).playerHeldBy.fallValueUncapped + Mathf.Clamp(Mathf.Abs(((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles.y - previousYAngle) * 5f, 0f, 10f), -150f, 150f); if ((double)((GrabbableObject)this).playerHeldBy.fallValue > 0.0) { ((GrabbableObject)this).playerHeldBy.fallValueUncapped = 0f; } } else { wasHeld = true; } previousYAngle = ((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles.y; } else { wasHeld = false; } if ((double)Time.time - (double)lastSound > 1.5) { lastSound = Time.time; MakeSoundServerRpc(); } if (!((double)Time.time - (double)lastHitCheck < 0.5)) { lastHitCheck = Time.time; CheckCollisionServerRpc(); } } private void StartMower() { if (soundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(soundCoroutine); } soundCoroutine = ((MonoBehaviour)this).StartCoroutine(MowerSoundCoroutine()); } private void StopMower() { if (soundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(soundCoroutine); } soundCoroutine = ((MonoBehaviour)this).StartCoroutine(StopMowerCoroutine()); } private IEnumerator MowerSoundCoroutine() { yield return null; itemAudio.volume = 1f; stopAudio.volume = 0f; itemAudio.Stop(); stopAudio.Stop(); itemAudio.PlayOneShot(Assets.MowStartClip); while (state) { if (!itemAudio.isPlaying) { itemAudio.PlayOneShot(Assets.MowLoopClip); } yield return (object)new WaitUntil((Func)(() => !itemAudio.isPlaying)); } } private IEnumerator StopMowerCoroutine() { float startTime = Time.time; stopAudio.volume = 0.5f; stopAudio.PlayOneShot(Assets.MowEndClip); while ((double)Time.time - (double)startTime < 0.25) { float delta = (float)(((double)Time.time - (double)startTime) / 0.25); itemAudio.volume = Mathf.Lerp(1f, 0f, delta); stopAudio.volume = Mathf.Lerp(0.5f, 1f, delta); yield return null; } itemAudio.Stop(); itemAudio.volume = 1f; stopAudio.volume = 1f; } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(789978299u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 789978299u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemClientRpc(); } } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(399636301u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 399636301u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!state) { StartMower(); state = true; } else { StopMower(); state = false; } } } [ServerRpc] public void MakeSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2214026521u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2214026521u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 20f, 0.7f, 0, false, 0); } } [ServerRpc] public void CheckCollisionServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(799441402u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 799441402u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RaycastHit[] array = Physics.SphereCastAll(((Component)bladeCollider).transform.position + bladeCollider.center, 0.6f, ((Component)bladeCollider).transform.up, 1.5f, 1084754248); damagedPlayers.Clear(); RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit val3 = array2[i]; if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).transform)) { PlayerControllerB component = ((Component)((RaycastHit)(ref val3)).transform).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled && !component.isPlayerDead && !damagedPlayers.Contains(component.playerClientId)) { damagedPlayers.Add(component.playerClientId); DamagePlayerClientRpc((int)component.playerClientId); continue; } } if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) { EnemyAICollisionDetect component2 = ((Component)((RaycastHit)(ref val3)).collider).GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.mainScript)) { EnemyAI mainScript = component2.mainScript; mainScript.HitEnemyOnLocalClient(1, default(Vector3), (Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) || ((GrabbableObject)this).isHeld) ? ((GrabbableObject)this).playerHeldBy : null, true, -1); } } } } [ClientRpc] public void DamagePlayerClientRpc(int playerToDamage) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(252793431u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerToDamage); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 252793431u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StartOfRound.Instance.allPlayerScripts[playerToDamage].DamagePlayer(10, true, true, (CauseOfDeath)15, 0, false, default(Vector3)); } } } 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 //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(789978299u, new RpcReceiveHandler(__rpc_handler_789978299), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(399636301u, new RpcReceiveHandler(__rpc_handler_399636301), "UseItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(2214026521u, new RpcReceiveHandler(__rpc_handler_2214026521), "MakeSoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(799441402u, new RpcReceiveHandler(__rpc_handler_799441402), "CheckCollisionServerRpc"); ((NetworkBehaviour)this).__registerRpc(252793431u, new RpcReceiveHandler(__rpc_handler_252793431), "DamagePlayerClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_789978299(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; ((MowerBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_399636301(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; ((MowerBehaviour)(object)target).UseItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2214026521(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((MowerBehaviour)(object)target).MakeSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_799441402(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((MowerBehaviour)(object)target).CheckCollisionServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_252793431(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 playerToDamage = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToDamage); target.__rpc_exec_stage = (__RpcExecStage)1; ((MowerBehaviour)(object)target).DamagePlayerClientRpc(playerToDamage); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MowerBehaviour"; } } public class OysterBehaviour : PhysicsProp { private AudioSource itemAudio; public override void Start() { ((GrabbableObject)this).Start(); ((GrabbableObject)this).SetScrapValue(3); itemAudio = ((Component)this).gameObject.GetComponent(); ScanNodeProperties componentInChildren = ((Component)this).gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.subText = "consommable"; } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((GrabbableObject)this).deactivated && buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && ((NetworkBehaviour)this).IsOwner) { UseItemServerRpc(); } } public override void PlayDropSFX() { if (!((Behaviour)this).enabled) { ((GrabbableObject)this).hasHitGround = true; } else { ((GrabbableObject)this).PlayDropSFX(); } } private void UseItemLocal() { if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { itemAudio.PlayOneShot(Assets.EatClip); if (Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && !((GrabbableObject)this).playerHeldBy.isPlayerDead && ((NetworkBehaviour)this).IsOwner) { Networker.Instance.SetPlayerHealthClientRpc((int)((GrabbableObject)this).playerHeldBy.playerClientId, Math.Min(((GrabbableObject)this).playerHeldBy.health + 70, 100)); } ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); ((Behaviour)this).enabled = false; ((Component)this).gameObject.SetActive(false); } } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2866630359u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2866630359u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 17f, 0.3f, 0, ((GrabbableObject)this).isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((NetworkBehaviour)this).IsHost) { UseItemLocal(); } UseItemClientRpc(); } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1420719593u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1420719593u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemLocal(); } } } 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 ((NetworkBehaviour)this).__registerRpc(2866630359u, new RpcReceiveHandler(__rpc_handler_2866630359), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1420719593u, new RpcReceiveHandler(__rpc_handler_1420719593), "UseItemClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_2866630359(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; ((OysterBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1420719593(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; ((OysterBehaviour)(object)target).UseItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "OysterBehaviour"; } } internal class PcRavixBehaviour : PhysicsProp { private AudioSource lowFanAudio; private AudioSource highFanAudio; private AudioClip calmFan; private AudioClip highFan; private float activatedAt; public bool isActive; private float droppedAt; private float droppedTime; private bool isDropped = true; private float overheatTime; private float explodeTime; private float lastNoiseEmitted; private float lastDamageTook; private bool activateCalled; private readonly Random random = new Random(); public override void Start() { ((GrabbableObject)this).Start(); calmFan = Assets.LowFan; highFan = Assets.HighFan; InitAudioSource(); lastDamageTook = Time.time; } private void InitAudioSource() { lowFanAudio = ((Component)this).gameObject.AddComponent(); lowFanAudio.spatialBlend = 1f; lowFanAudio.dopplerLevel = 0.3f; lowFanAudio.spread = 45f; lowFanAudio.rolloffMode = (AudioRolloffMode)1; lowFanAudio.minDistance = 5f; lowFanAudio.maxDistance = 20f; lowFanAudio.clip = calmFan; lowFanAudio.volume = 0f; highFanAudio = ((Component)this).gameObject.AddComponent(); highFanAudio.spatialBlend = 1f; highFanAudio.dopplerLevel = 0.3f; highFanAudio.spread = 45f; highFanAudio.rolloffMode = (AudioRolloffMode)1; highFanAudio.minDistance = 5f; highFanAudio.maxDistance = 20f; highFanAudio.clip = highFan; highFanAudio.volume = 0f; } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); if (((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && !((GrabbableObject)this).deactivated && !activateCalled) { activateCalled = true; ActivateServerRpc(); } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); if (((NetworkBehaviour)this).IsOwner && !((GrabbableObject)this).deactivated) { DropServerRpc(); } } public override void Update() { //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (((GrabbableObject)this).deactivated) { return; } if (!isActive) { if (Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && !activateCalled) { activateCalled = true; ActivateServerRpc(); } return; } if ((double)Time.time - (double)lastNoiseEmitted >= 3.0 && ((NetworkBehaviour)this).IsOwner) { lastNoiseEmitted = Time.time; MakeNoiseServerRpc(); } if (IsExploding()) { Explode(); if (Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && !activateCalled) { activateCalled = true; ActivateServerRpc(); } return; } if (!Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && isDropped && (double)Time.time - (double)droppedAt >= (double)droppedTime) { Deactivate(); } if (IsOverheating() && !((double)Time.time - (double)lastDamageTook < 0.5) && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { lastDamageTook = Time.time; ((GrabbableObject)this).playerHeldBy.DamagePlayer(2, true, true, (CauseOfDeath)13, 0, false, default(Vector3)); } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((GrabbableObject)this).deactivated && buttonDown && ((NetworkBehaviour)this).IsOwner) { LaunchServerRpc(); } } public void Activate(float overheat, float explode) { activateCalled = false; if (!isActive) { isDropped = !Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy); isActive = true; activatedAt = Time.time; overheatTime = overheat; explodeTime = explode; highFanAudio.volume = 0f; lowFanAudio.volume = 0f; ((MonoBehaviour)this).StopAllCoroutines(); ((MonoBehaviour)this).StartCoroutine(FadeAudio(1f, 0f)); ((MonoBehaviour)this).StartCoroutine(PCAudioCoroutine()); } } public void Drop(float dropped) { if (isActive) { droppedAt = Time.time; droppedTime = dropped; isDropped = true; } } public void Deactivate() { if (isActive) { isActive = false; } } private bool IsOverheating() { return (double)Time.time - (double)activatedAt >= (double)overheatTime; } private bool IsExploding() { return (double)Time.time - (double)activatedAt >= (double)explodeTime; } public void Explode() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (isActive) { Deactivate(); Landmine.SpawnExplosion(((Component)this).transform.position, true, 0f, 2f, 20, 30f, (GameObject)null, false); } } public void Launch() { if (isActive) { if (!IsOverheating()) { activatedAt = Time.time - overheatTime; } else { Explode(); } } } private IEnumerator PCAudioCoroutine() { yield return null; Coroutine currentCoroutine = null; while (isActive && !((GrabbableObject)this).deactivated) { if (IsOverheating()) { if (!highFanAudio.isPlaying) { highFanAudio.Play(); } if (Mathf.Approximately(lowFanAudio.volume, 1f)) { currentCoroutine = ((MonoBehaviour)this).StartCoroutine(FadeAudio(0f, 1f)); yield return (object)new WaitForSeconds(0.5f); } if (lowFanAudio.isPlaying) { lowFanAudio.Stop(); } } else { if (!lowFanAudio.isPlaying) { lowFanAudio.Play(); } if (Mathf.Approximately(highFanAudio.volume, 1f)) { currentCoroutine = ((MonoBehaviour)this).StartCoroutine(FadeAudio(1f, 0f)); yield return (object)new WaitForSeconds(0.5f); } if (highFanAudio.isPlaying) { highFanAudio.Stop(); } } yield return null; } if (currentCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(currentCoroutine); } ((MonoBehaviour)this).StartCoroutine(FadeAudio(0f, 0f)); yield return (object)new WaitForSeconds(0.5f); lowFanAudio.Stop(); highFanAudio.Stop(); } private IEnumerator FadeAudio(float lowAudio, float highAudio) { yield return null; float timeElapsed = 0f; float initialLowVol = lowFanAudio.volume; float initialHighVol = highFanAudio.volume; while ((double)timeElapsed < 0.5) { lowFanAudio.volume = Mathf.Lerp(initialLowVol, lowAudio, timeElapsed / 0.5f); highFanAudio.volume = Mathf.Lerp(initialHighVol, highAudio, timeElapsed / 0.5f); timeElapsed += Time.deltaTime; yield return null; } lowFanAudio.volume = lowAudio; highFanAudio.volume = highAudio; } [ServerRpc(RequireOwnership = false)] public void ActivateServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1985376129u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1985376129u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; float num = (float)(random.NextDouble() * 75.0 + 45.0); float explode = (float)((double)num + random.NextDouble() * 12.0 + 8.0); if (!((NetworkBehaviour)this).IsHost) { Activate(num, explode); } ActivateClientRpc(num, explode); } } [ClientRpc] public void ActivateClientRpc(float overheat, float explode) { //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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3794271611u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref overheat, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3794271611u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Activate(overheat, explode); } } } [ServerRpc(RequireOwnership = false)] public void DropServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(217129023u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 217129023u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; float dropped = (float)(random.NextDouble() * 5.0 + 5.0); if (!((NetworkBehaviour)this).IsHost) { Drop(dropped); } DropClientRpc(dropped); } } [ClientRpc] public void DropClientRpc(float dropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3525580550u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dropped, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3525580550u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Drop(dropped); } } } [ServerRpc(RequireOwnership = false)] public void LaunchServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2095134757u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2095134757u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { Launch(); } LaunchClientRpc(); } } [ClientRpc] public void LaunchClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2282514684u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2282514684u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Launch(); } } } [ServerRpc(RequireOwnership = false)] public void MakeNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1700458443u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1700458443u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, IsOverheating() ? 22f : 15f, 0.7f, 0, false, 0); } } } 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 //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(1985376129u, new RpcReceiveHandler(__rpc_handler_1985376129), "ActivateServerRpc"); ((NetworkBehaviour)this).__registerRpc(3794271611u, new RpcReceiveHandler(__rpc_handler_3794271611), "ActivateClientRpc"); ((NetworkBehaviour)this).__registerRpc(217129023u, new RpcReceiveHandler(__rpc_handler_217129023), "DropServerRpc"); ((NetworkBehaviour)this).__registerRpc(3525580550u, new RpcReceiveHandler(__rpc_handler_3525580550), "DropClientRpc"); ((NetworkBehaviour)this).__registerRpc(2095134757u, new RpcReceiveHandler(__rpc_handler_2095134757), "LaunchServerRpc"); ((NetworkBehaviour)this).__registerRpc(2282514684u, new RpcReceiveHandler(__rpc_handler_2282514684), "LaunchClientRpc"); ((NetworkBehaviour)this).__registerRpc(1700458443u, new RpcReceiveHandler(__rpc_handler_1700458443), "MakeNoiseServerRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_1985376129(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; ((PcRavixBehaviour)(object)target).ActivateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3794271611(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_004a: 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_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float overheat = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref overheat, default(ForPrimitives)); float explode = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explode, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PcRavixBehaviour)(object)target).ActivateClientRpc(overheat, explode); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_217129023(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; ((PcRavixBehaviour)(object)target).DropServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3525580550(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) { float dropped = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dropped, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PcRavixBehaviour)(object)target).DropClientRpc(dropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2095134757(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; ((PcRavixBehaviour)(object)target).LaunchServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2282514684(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; ((PcRavixBehaviour)(object)target).LaunchClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1700458443(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; ((PcRavixBehaviour)(object)target).MakeNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PcRavixBehaviour"; } } internal class PlanAssassinBehaviour : PhysicsProp { private readonly Random rng = new Random(); public AudioSource itemAudio; private float lastTimeEmitSound; private float nextEmitIn; private float nextEmitInHeld; private int emitSoundChance = 60; internal const int KILL_MASK = 1084754248; private Random random; public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); lastTimeEmitSound = Time.time; random = new Random(); nextEmitIn = (float)(random.NextDouble() * 100.0) + 20f; nextEmitInHeld = (float)(random.NextDouble() * 35.0) + 5f; } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0084: 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_00a3: 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_00c2: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((GrabbableObject)this).deactivated && buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.shipHasLanded && ((GrabbableObject)this).isHeld && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) && ((NetworkBehaviour)this).IsOwner) { int randomEffect = rng.Next(0, 100); CheckHit(Physics.SphereCastAll(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position + ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.right * -0.35f, 0.8f, ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward, 1.5f, 1084754248, (QueryTriggerInteraction)2), randomEffect); } } private void CheckHit(RaycastHit[] hitResult, int randomEffect) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0071: Unknown result type (might be due to invalid IL or missing references) EnemyAI val = null; bool flag = false; ulong playerID = 0uL; IHittable val3 = default(IHittable); RaycastHit val4 = default(RaycastHit); for (int i = 0; i < hitResult.Length; i++) { RaycastHit val2 = hitResult[i]; if (((Component)((RaycastHit)(ref val2)).transform).TryGetComponent(ref val3) && !((Object)(object)((RaycastHit)(ref val2)).transform == (Object)(object)((Component)((GrabbableObject)this).playerHeldBy).transform) && (!(((RaycastHit)(ref val2)).point != Vector3.zero) || !Physics.Linecast(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position, ((RaycastHit)(ref val2)).point, ref val4, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))) { EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val2)).collider).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.mainScript != (Object)null && !component.mainScript.isEnemyDead) { val = component.mainScript; break; } if (!((Object)(object)((Component)((RaycastHit)(ref val2)).transform).GetComponent() == (Object)null) && !((Component)((RaycastHit)(ref val2)).transform).GetComponent().isPlayerDead && ((Component)((RaycastHit)(ref val2)).transform).GetComponent().isPlayerControlled) { playerID = ((Component)((RaycastHit)(ref val2)).transform).GetComponent().playerClientId; flag = true; break; } } } if (randomEffect >= 20) { if ((Object)(object)val != (Object)null) { val.HitEnemyOnLocalClient(100, default(Vector3), ((GrabbableObject)this).playerHeldBy, false, -1); } else if (flag) { PlayerDieServerRpc(playerID); } else { PlayerDieServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } } else { PlayerDieServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } PlaySoundServerRpc(4); DeleteServerRpc(); } public override void Update() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (((NetworkBehaviour)this).IsOwner && !((GrabbableObject)this).deactivated && (!((double)Time.time - (double)lastTimeEmitSound <= (double)nextEmitIn) || ((GrabbableObject)this).isHeld) && (!((double)Time.time - (double)lastTimeEmitSound <= (double)nextEmitInHeld) || !((GrabbableObject)this).isHeld)) { lastTimeEmitSound = Time.time; bool flag = random.Next(0, 100) < emitSoundChance; if (flag) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 15f, 0.7f, 0, false, 0); PlaySoundServerRpc(rng.Next(0, Assets.PlanClips.Count)); } UpdateSoundEmit(flag); } } private void UpdateSoundEmit(bool soundHasPlayed) { emitSoundChance = ((!soundHasPlayed) ? Mathf.Min(100, emitSoundChance + 20) : Mathf.Max(40, emitSoundChance - 20)); nextEmitIn = (float)(random.NextDouble() * 100.0) + 20f; nextEmitInHeld = (float)(random.NextDouble() * 35.0) + 5f; } [ServerRpc(RequireOwnership = false)] public void PlaySoundServerRpc(int soundID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(574780111u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, soundID); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 574780111u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 13f, 0.8f, 0, ((GrabbableObject)this).isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((NetworkBehaviour)this).IsHost) { PlaySoundWithId(soundID); } PlaySoundClientRpc(soundID); } } [ClientRpc] public void PlaySoundClientRpc(int soundId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(859882352u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, soundId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 859882352u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlaySoundWithId(soundId); } } } [ServerRpc(RequireOwnership = false)] public void DeleteServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(825271457u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 825271457u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { Delete(); } DeleteClientRpc(); } } [ClientRpc] public void DeleteClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2106699455u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2106699455u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Delete(); } } } [ServerRpc(RequireOwnership = false)] public void PlayerDieServerRpc(ulong playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(461893714u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerID); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 461893714u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { PlayerDie(playerID); } PlayerDieClientRpc(playerID); } } [ClientRpc] public void PlayerDieClientRpc(ulong playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2720042367u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2720042367u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerDie(playerID); } } } public void Delete() { ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); ((GrabbableObject)this).deactivated = true; } public void PlayerDie(ulong playerID) { //IL_002d: 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_003e: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerID && ((NetworkBehaviour)val).IsOwner) { val.KillPlayer(Vector3.zero, true, (CauseOfDeath)12, 0, default(Vector3), false); } } } public void PlaySoundWithId(int id) { itemAudio.PlayOneShot(Assets.PlanClips[id]); } 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 //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(574780111u, new RpcReceiveHandler(__rpc_handler_574780111), "PlaySoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(859882352u, new RpcReceiveHandler(__rpc_handler_859882352), "PlaySoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(825271457u, new RpcReceiveHandler(__rpc_handler_825271457), "DeleteServerRpc"); ((NetworkBehaviour)this).__registerRpc(2106699455u, new RpcReceiveHandler(__rpc_handler_2106699455), "DeleteClientRpc"); ((NetworkBehaviour)this).__registerRpc(461893714u, new RpcReceiveHandler(__rpc_handler_461893714), "PlayerDieServerRpc"); ((NetworkBehaviour)this).__registerRpc(2720042367u, new RpcReceiveHandler(__rpc_handler_2720042367), "PlayerDieClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_574780111(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 soundID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundID); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlanAssassinBehaviour)(object)target).PlaySoundServerRpc(soundID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_859882352(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 soundId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundId); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlanAssassinBehaviour)(object)target).PlaySoundClientRpc(soundId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_825271457(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; ((PlanAssassinBehaviour)(object)target).DeleteServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2106699455(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; ((PlanAssassinBehaviour)(object)target).DeleteClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_461893714(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) { ulong playerID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlanAssassinBehaviour)(object)target).PlayerDieServerRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2720042367(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) { ulong playerID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlanAssassinBehaviour)(object)target).PlayerDieClientRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PlanAssassinBehaviour"; } } public class RavcamBehaviour : GrabbableObject { private AudioSource itemAudio; private float lastUse; private bool hasBeenHeldByPlayer; public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.AddComponent(); itemAudio.spatialBlend = 1f; itemAudio.dopplerLevel = 0.45f; itemAudio.spread = 40f; itemAudio.rolloffMode = (AudioRolloffMode)1; itemAudio.minDistance = 3f; itemAudio.maxDistance = 20f; lastUse = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && Object.op_Implicit((Object)(object)base.playerHeldBy) && !((double)(Time.time - lastUse) < 1.0)) { lastUse = Time.time; SpringServerRpc(); ((MonoBehaviour)this).StartCoroutine(CameraShakeCoroutine(1f, 30f, 15f)); } } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); if (Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead && base.playerHeldBy.isPlayerControlled) { Downgrade(); hasBeenHeldByPlayer = true; } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); if (hasBeenHeldByPlayer) { Upgrade(); } hasBeenHeldByPlayer = false; } private IEnumerator CameraShakeCoroutine(float duration, float magnitude, float speed) { if (Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead && base.playerHeldBy.isPlayerControlled) { float elapsed = 0f; float lastValue = 0f; while (elapsed < duration && Object.op_Implicit((Object)(object)base.playerHeldBy) && !base.playerHeldBy.isPlayerDead && base.playerHeldBy.isPlayerControlled) { float dy = Mathf.Sin(elapsed * speed) * magnitude * ((duration - elapsed) / duration); PlayerControllerBPatch.CamUpDict[base.playerHeldBy.playerClientId] = dy - lastValue; lastValue = dy; elapsed += Time.deltaTime; yield return null; } } } private void Downgrade() { if (!((Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { if (!Object.op_Implicit((Object)(object)((Component)base.playerHeldBy).gameObject.GetComponent())) { ((Component)base.playerHeldBy).gameObject.AddComponent(); } ((MonoBehaviour)this).StartCoroutine(DowngradeCoroutine(base.playerHeldBy)); } } private static IEnumerator DowngradeCoroutine(PlayerControllerB player) { yield return (object)new WaitForFixedUpdate(); ((Component)player).gameObject.GetComponent().DowngradeQuality(); } private void Upgrade() { if (hasBeenHeldByPlayer) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (Object.op_Implicit((Object)(object)((Component)localPlayerController).gameObject.GetComponent())) { ((Component)localPlayerController).gameObject.GetComponent().UpgradeQuality(); } } } [ServerRpc(RequireOwnership = false)] public void SpringServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2935979782u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2935979782u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpringClientRpc(Random.Range(0, Assets.SpringClips.Count)); } } } [ClientRpc] public void SpringClientRpc(int clip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2116282694u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clip); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2116282694u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; itemAudio.pitch = Random.Range(0.9f, 1.1f); itemAudio.PlayOneShot(Assets.SpringClips[clip], 0.7f); } } } protected override void __initializeVariables() { ((GrabbableObject)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(2935979782u, new RpcReceiveHandler(__rpc_handler_2935979782), "SpringServerRpc"); ((NetworkBehaviour)this).__registerRpc(2116282694u, new RpcReceiveHandler(__rpc_handler_2116282694), "SpringClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2935979782(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; ((RavcamBehaviour)(object)target).SpringServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2116282694(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 clip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clip); target.__rpc_exec_stage = (__RpcExecStage)1; ((RavcamBehaviour)(object)target).SpringClientRpc(clip); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RavcamBehaviour"; } } public class RouterBehaviour : PhysicsProp { private bool inUse; private Transform parentTransform; private Vector3 previousRelativePos = Vector3.zero; private Vector3 previousPos = Vector3.zero; private Vector3 previousRot = Vector3.zero; private bool hasChosenNextPos; private float heldTime; private float lastTimeLagged; private float nextLagInterval; private float nextLagDistance; private bool wasInside; private bool wasInShip; private float GetLagFactor() { return Mathf.Clamp((float)(4.0 - ((double)Time.time - (double)heldTime) / 20.0), 0.5f, 4f); } private void ChangeNextLagInterval() { nextLagInterval = Random.Range(0.25f, GetLagFactor()); nextLagDistance = nextLagInterval - Random.Range(0.1f, GetLagFactor() / 3f); hasChosenNextPos = false; } public override void GrabItem() { //IL_0037: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (!inUse && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { inUse = true; previousPos = ((Component)((GrabbableObject)this).playerHeldBy).transform.position; previousRot = ((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles; lastTimeLagged = Time.time; heldTime = Time.time; ChangeNextLagInterval(); } ((GrabbableObject)this).GrabItem(); } public override void DiscardItem() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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) if (inUse && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { inUse = false; previousPos = Vector3.zero; previousRot = Vector3.zero; } ((GrabbableObject)this).DiscardItem(); } public override void Update() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_010b: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (!inUse || !((NetworkBehaviour)this).IsOwner || !Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) || !StartOfRound.Instance.shipHasLanded) { return; } if (!hasChosenNextPos && (Time.time - lastTimeLagged >= nextLagDistance || Time.time - lastTimeLagged >= nextLagInterval)) { hasChosenNextPos = true; previousPos = ((Component)((GrabbableObject)this).playerHeldBy).transform.position; previousRot = ((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles; wasInside = ((GrabbableObject)this).playerHeldBy.isInsideFactory; wasInShip = ((GrabbableObject)this).playerHeldBy.isInHangarShipRoom; parentTransform = ((Component)((GrabbableObject)this).playerHeldBy).transform.parent; if (Object.op_Implicit((Object)(object)parentTransform)) { previousRelativePos = parentTransform.InverseTransformPoint(previousPos); } } if (!(Time.time - lastTimeLagged < nextLagInterval)) { lastTimeLagged = Time.time; TeleportPlayerServerRpc((int)((GrabbableObject)this).playerHeldBy.playerClientId, previousPos, wasInside, wasInShip); ((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles = previousRot; ChangeNextLagInterval(); } } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerServerRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_0117: 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_013c: 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_0139: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2589013798u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val)).WriteValueSafe(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref insideShip, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2589013798u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 position2 = position; if (Object.op_Implicit((Object)(object)parentTransform)) { position2 = parentTransform.TransformPoint(previousRelativePos); } TeleportPlayerClientRpc(playerId, position2, inside, insideShip); } } [ClientRpc] public void TeleportPlayerClientRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1725270293u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val)).WriteValueSafe(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref insideShip, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1725270293u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; val3.StopSinkingServerRpc(); if (Object.op_Implicit((Object)(object)val3.currentTriggerInAnimationWith)) { val3.currentTriggerInAnimationWith.CancelAnimationExternally(); } val3.inSpecialInteractAnimation = false; val3.isClimbingLadder = false; val3.isInHangarShipRoom = insideShip; val3.isInsideFactory = inside; val3.averageVelocity = 0f; val3.velocityLastFrame = Vector3.zero; val3.TeleportPlayer(position, false, 0f, false, true); if (Object.op_Implicit((Object)(object)Object.FindObjectOfType())) { if (val3.isInsideFactory) { Object.FindObjectOfType().audioPresets[2].ChangeAudioReverbForPlayer(val3); } else { Object.FindObjectOfType().audioPresets[3].ChangeAudioReverbForPlayer(val3); } } } 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 ((NetworkBehaviour)this).__registerRpc(2589013798u, new RpcReceiveHandler(__rpc_handler_2589013798), "TeleportPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1725270293u, new RpcReceiveHandler(__rpc_handler_1725270293), "TeleportPlayerClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_2589013798(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool inside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inside, default(ForPrimitives)); bool insideShip = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref insideShip, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((RouterBehaviour)(object)target).TeleportPlayerServerRpc(playerId, position, inside, insideShip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1725270293(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool inside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inside, default(ForPrimitives)); bool insideShip = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref insideShip, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((RouterBehaviour)(object)target).TeleportPlayerClientRpc(playerId, position, inside, insideShip); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RouterBehaviour"; } } internal class SausageBehaviour : PhysicsProp { private AudioSource itemAudio; public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); ((GrabbableObject)this).SetScrapValue(Random.Range((int)((double)((GrabbableObject)this).itemProperties.minValue * 0.4), (int)((double)((GrabbableObject)this).itemProperties.maxValue * 0.4))); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((GrabbableObject)this).deactivated && buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && ((NetworkBehaviour)this).IsOwner) { UseItemServerRpc(); } } public override void PlayDropSFX() { if (!((Behaviour)this).enabled) { ((GrabbableObject)this).hasHitGround = true; } else { ((GrabbableObject)this).PlayDropSFX(); } } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1144366676u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1144366676u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 17f, 0.3f, 0, ((GrabbableObject)this).isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); if (!((NetworkBehaviour)this).IsHost) { UseItemLocal(); } UseItemClientRpc(); } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3396988321u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3396988321u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseItemLocal(); } } } public void UseItemLocal() { itemAudio.PlayOneShot(Assets.EatClip); if (Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { PlayerControllerBPatch.SausageDict[((GrabbableObject)this).playerHeldBy.playerClientId] = Time.time; } ((Behaviour)this).enabled = false; ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); } 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 ((NetworkBehaviour)this).__registerRpc(1144366676u, new RpcReceiveHandler(__rpc_handler_1144366676), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(3396988321u, new RpcReceiveHandler(__rpc_handler_3396988321), "UseItemClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_1144366676(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; ((SausageBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3396988321(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; ((SausageBehaviour)(object)target).UseItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SausageBehaviour"; } } public class SausageTicketBehaviour : PhysicsProp { private bool hasBeenUsed; private AudioSource itemAudio; public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); } public override void ItemActivate(bool used, bool buttonDown = true) { if (buttonDown && ((NetworkBehaviour)this).IsOwner && !hasBeenUsed && !((GrabbableObject)this).deactivated) { hasBeenUsed = true; ActivateServerRpc(); } ((GrabbableObject)this).ItemActivate(used, buttonDown); } public void Activate() { itemAudio.PlayOneShot(Assets.Comsau); ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); ((GrabbableObject)this).deactivated = true; } public void OrderSausageServer() { if (((NetworkBehaviour)this).IsServer) { ItemDropshipPatch.DeliverItemServer(Assets.Sausage); } } [ServerRpc(RequireOwnership = false)] public void ActivateServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3326348728u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3326348728u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 10f, 0.5f, 0, false, 0); OrderSausageServer(); if (!((NetworkBehaviour)this).IsHost) { Activate(); } ActivateClientRpc(); } } [ClientRpc] public void ActivateClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1955070242u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1955070242u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Activate(); } } } 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 ((NetworkBehaviour)this).__registerRpc(3326348728u, new RpcReceiveHandler(__rpc_handler_3326348728), "ActivateServerRpc"); ((NetworkBehaviour)this).__registerRpc(1955070242u, new RpcReceiveHandler(__rpc_handler_1955070242), "ActivateClientRpc"); ((PhysicsProp)this).__initializeRpcs(); } private static void __rpc_handler_3326348728(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; ((SausageTicketBehaviour)(object)target).ActivateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1955070242(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; ((SausageTicketBehaviour)(object)target).ActivateClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SausageTicketBehaviour"; } } public class ScreenBehaviour : NoisemakerProp { private VideoPlayer player; private AudioSource audioSource; private Material offMaterial; private Material onMaterial; private MeshRenderer renderer; private bool playingClip; private float lastEmit; private static bool clipPlayingGlobal; public override void Start() { ((NoisemakerProp)this).Start(); ((GrabbableObject)this).floorYRot = -1; offMaterial = Assets.ScreenOffMat; onMaterial = Assets.ScreenOnMat; renderer = ((Component)this).gameObject.GetComponentInChildren(); player = ((Component)this).gameObject.GetComponent(); audioSource = ((Component)this).gameObject.GetComponent(); player.SetTargetAudioSource((ushort)0, audioSource); lastEmit = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && !playingClip) { UseItemServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = (playingClip ? 10f : 0f); if (((NetworkBehaviour)this).IsOwner && !((double)(Time.time - lastEmit) < 1.5) && player.isPlaying) { lastEmit = Time.time; MakeNoiseServerRpc(); } } private void SetAudioSource() { player.SetTargetAudioSource((ushort)0, audioSource); } private void SetOn(bool on) { Material[] sharedMaterials = ((Renderer)renderer).sharedMaterials; sharedMaterials[1] = ((!on) ? offMaterial : onMaterial); ((Renderer)renderer).sharedMaterials = sharedMaterials; } private float PlayClip(VideoClip clip) { player.clip = clip; player.Play(); return (float)clip.length; } private IEnumerator PlayClipCoroutine(int clipIndex) { if (!player.isPlaying) { clipPlayingGlobal = true; playingClip = true; SetAudioSource(); PlayClip(Assets.TranstitionClip); SetOn(on: true); yield return (object)new WaitForSeconds(0.5f); float clipLenght = PlayClip(Assets.ScreenClips[clipIndex]); yield return (object)new WaitForSeconds(clipLenght); PlayClip(Assets.TranstitionClip); player.time = 1.0; yield return (object)new WaitForSeconds(0.5f); player.Stop(); SetOn(on: false); playingClip = false; clipPlayingGlobal = false; } } [ServerRpc] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2228565840u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2228565840u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!clipPlayingGlobal) { UseItemClientRpc(Random.Range(0, Assets.ScreenClips.Count)); } } } [ClientRpc] public void UseItemClientRpc(int clipIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1973350668u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1973350668u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(PlayClipCoroutine(clipIndex)); } } } [ServerRpc] public void MakeNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3169674148u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3169674148u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 17f, 0.6f, 0, false, 0); } } protected override void __initializeVariables() { ((NoisemakerProp)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(2228565840u, new RpcReceiveHandler(__rpc_handler_2228565840), "UseItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1973350668u, new RpcReceiveHandler(__rpc_handler_1973350668), "UseItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(3169674148u, new RpcReceiveHandler(__rpc_handler_3169674148), "MakeNoiseServerRpc"); ((NoisemakerProp)this).__initializeRpcs(); } private static void __rpc_handler_2228565840(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ScreenBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1973350668(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 clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((ScreenBehaviour)(object)target).UseItemClientRpc(clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3169674148(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ScreenBehaviour)(object)target).MakeNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ScreenBehaviour"; } } public class TelephoneBehaviour : GrabbableObject { private static readonly int Open = Animator.StringToHash("Open"); private VideoPlayer player; private AudioSource audioSource; private Animator animator; private Material offMaterial; private Material onMaterial; private MeshRenderer renderer; private bool playingClip; private float lastUse; private bool opened; private float lastOpenClose; private bool isRinging; private float lastRing; private float startRing; private float lastEmit; public override void Start() { ((GrabbableObject)this).Start(); offMaterial = Assets.ScreenOffMat; onMaterial = Assets.TelMat; renderer = ((Component)((Component)this).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponent(); player = ((Component)this).gameObject.GetComponent(); audioSource = ((Component)this).gameObject.GetComponent(); player.SetTargetAudioSource((ushort)0, audioSource); lastUse = Time.time; animator = ((Component)this).gameObject.GetComponentInChildren(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner && buttonDown && opened && !playingClip && isRinging && !((double)(Time.time - lastUse) < 1.5)) { lastUse = Time.time; PlayClipServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); if (((NetworkBehaviour)this).IsOwner) { if (playingClip) { if (!((double)(Time.time - lastEmit) <= 1.5)) { MakeNoiseServerRpc(); lastEmit = Time.time; } return; } if (opened && !isRinging && (double)(Time.time - lastRing) > 60.0) { ModBase.Instance.logger.LogDebug((object)"Lingin"); RingServerRpc(); } } if (isRinging && !((double)(Time.time - startRing) <= 15.0)) { SetRinging(ringing: false); isRinging = false; } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.equippedUsableItemQE = true; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); if (!((Object)(object)base.playerHeldBy == (Object)null)) { base.playerHeldBy.equippedUsableItemQE = false; } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); if (!((Object)(object)base.playerHeldBy == (Object)null)) { base.playerHeldBy.equippedUsableItemQE = false; } } private void SetOn(bool on) { Material[] materials = ((Renderer)renderer).materials; materials[1] = (on ? onMaterial : offMaterial); ((Renderer)renderer).materials = materials; } private void SetRinging(bool ringing) { Material[] materials = ((Renderer)renderer).materials; materials[1] = (ringing ? Assets.CallingMat : Assets.ScreenOffMat); ((Renderer)renderer).materials = materials; } private IEnumerator PlayClipCoroutine(int clipIndex) { if (!player.isPlaying) { isRinging = false; audioSource.Stop(); playingClip = true; SetOn(on: true); VideoClip clip = Assets.TelClips[clipIndex]; player.clip = clip; player.Play(); yield return (object)new WaitForSeconds((float)clip.length); player.Stop(); SetOn(on: false); playingClip = false; } } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if (!(!((NetworkBehaviour)this).IsOwner || right) && !(Time.time - lastOpenClose < 0.7f)) { lastOpenClose = Time.time; OpenCloseServerRpc(!opened); } } private IEnumerator OpenCloseCoroutine(bool open) { if (playingClip && !open) { player.Stop(); SetOn(on: false); } animator.SetBool(Open, open); yield return (object)new WaitForSeconds(0.5f); opened = open; } [ServerRpc(RequireOwnership = false)] private void OpenCloseServerRpc(bool open) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2702481114u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2702481114u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OpenCloseClientRpc(open); } } } [ClientRpc] private void OpenCloseClientRpc(bool open) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1396217511u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1396217511u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(OpenCloseCoroutine(open)); } } } [ServerRpc(RequireOwnership = false)] private void PlayClipServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2639938388u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2639938388u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayClipClientRpc(Random.Range(0, Assets.TelClips.Count)); } } } [ClientRpc] private void PlayClipClientRpc(int clipIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(133570624u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 133570624u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(PlayClipCoroutine(clipIndex)); } } } [ServerRpc(RequireOwnership = false)] private void MakeNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(860286934u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 860286934u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MakeNoiseClientRpc(); } } } [ClientRpc] private void MakeNoiseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2610199793u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2610199793u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.PlayAudibleNoise(((Component)this).gameObject.transform.position, 15f, 0.8f, 0, false, 0); } } } [ServerRpc(RequireOwnership = false)] private void RingServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3249018410u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3249018410u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!isRinging) { RingClientRpc(Random.Range(0, 120)); } } } [ClientRpc] private void RingClientRpc(int rng) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(786560639u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, rng); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 786560639u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!isRinging) { audioSource.PlayOneShot(Assets.RingtoneClip); SetRinging(ringing: true); isRinging = true; startRing = Time.time; lastRing = Time.time + (float)rng; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2702481114u, new RpcReceiveHandler(__rpc_handler_2702481114), "OpenCloseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1396217511u, new RpcReceiveHandler(__rpc_handler_1396217511), "OpenCloseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2639938388u, new RpcReceiveHandler(__rpc_handler_2639938388), "PlayClipServerRpc"); ((NetworkBehaviour)this).__registerRpc(133570624u, new RpcReceiveHandler(__rpc_handler_133570624), "PlayClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(860286934u, new RpcReceiveHandler(__rpc_handler_860286934), "MakeNoiseServerRpc"); ((NetworkBehaviour)this).__registerRpc(2610199793u, new RpcReceiveHandler(__rpc_handler_2610199793), "MakeNoiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(3249018410u, new RpcReceiveHandler(__rpc_handler_3249018410), "RingServerRpc"); ((NetworkBehaviour)this).__registerRpc(786560639u, new RpcReceiveHandler(__rpc_handler_786560639), "RingClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2702481114(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 open = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref open, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TelephoneBehaviour)(object)target).OpenCloseServerRpc(open); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1396217511(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 open = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref open, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TelephoneBehaviour)(object)target).OpenCloseClientRpc(open); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2639938388(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; ((TelephoneBehaviour)(object)target).PlayClipServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_133570624(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 clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((TelephoneBehaviour)(object)target).PlayClipClientRpc(clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_860286934(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; ((TelephoneBehaviour)(object)target).MakeNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2610199793(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; ((TelephoneBehaviour)(object)target).MakeNoiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3249018410(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; ((TelephoneBehaviour)(object)target).RingServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_786560639(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 rng = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref rng); target.__rpc_exec_stage = (__RpcExecStage)1; ((TelephoneBehaviour)(object)target).RingClientRpc(rng); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TelephoneBehaviour"; } } } namespace LCPlanAssassin.UI { public class Jumpscare : MonoBehaviour { private bool isCurrentlyActive; private GameObject videoElement; private VideoPlayer player; private void Start() { videoElement = ((Component)((Component)this).transform.GetChild(0)).gameObject; videoElement.SetActive(false); player = ((Component)this).gameObject.GetComponent(); player.SetTargetAudioSource((ushort)0, ((Component)this).gameObject.GetComponent()); } public void PlayOnScreen() { if (!isCurrentlyActive) { ((MonoBehaviour)this).StartCoroutine(Scare()); } } private IEnumerator Scare() { isCurrentlyActive = true; VideoClip clip = Assets.NClips[Random.Range(0, Assets.NClips.Count)]; float clipTime = (float)clip.length; player.clip = clip; player.Play(); videoElement.SetActive(true); yield return (object)new WaitForSeconds(clipTime); videoElement.SetActive(false); player.Stop(); isCurrentlyActive = false; } } } namespace LCPlanAssassin.Utils { [HarmonyPatch] public class Networker : NetworkBehaviour { private static GameObject _networkPrefab; public static Networker Instance { get; private set; } public override void OnNetworkSpawn() { Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } public override void OnNetworkDespawn() { if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } ((NetworkBehaviour)this).OnNetworkDespawn(); } [ServerRpc(RequireOwnership = false)] public void NScareServerRpc(int playerToScare) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1378493341u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerToScare); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1378493341u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NScareClientRpc(playerToScare); } } } [ClientRpc] public void NScareClientRpc(int playerToScare) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2896976942u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerToScare); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2896976942u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerToScare]; if (((NetworkBehaviour)val3).IsOwner && val3.isPlayerControlled && !val3.isPlayerDead) { ((MonoBehaviour)this).StartCoroutine(WaitAndScare()); } } } [ServerRpc(RequireOwnership = false)] public void SpectrumServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1751953266u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1751953266u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SpectrumClientRpc(playerId, Random.Range(0, Assets.SpectrumMusics.Count)); } } } [ClientRpc] public void SpectrumClientRpc(int playerId, int clip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4180565523u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, clip); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4180565523u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { SpectrumComponent component = ((Component)val3).GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)val3).gameObject.AddComponent(); component = ((Component)val3).GetComponent(); } if (!component.IsPlaying()) { ((MonoBehaviour)val3).StartCoroutine(PlayingCoroutine(component, clip)); } } } [ServerRpc(RequireOwnership = false)] public void RotateServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(581288842u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 581288842u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RotateClientRpc(playerId); } } } [ClientRpc] public void RotateClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2509764208u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2509764208u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { RotateComponent rotateComponent = ((Component)val3).GetComponent(); if ((Object)(object)rotateComponent == (Object)null) { rotateComponent = ((Component)val3).gameObject.AddComponent(); } ((MonoBehaviour)val3).StartCoroutine(StartRotatingCoroutine(rotateComponent)); } } [ServerRpc(RequireOwnership = false)] public void PlayRotateClipServerRpc(int playerId, int clipId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3337105690u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, clipId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3337105690u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayRotateClipClientRpc(playerId, clipId); } } } [ClientRpc] public void PlayRotateClipClientRpc(int playerId, int clipId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4253895879u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, clipId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4253895879u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { RotateComponent component = ((Component)val3).GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)val3).gameObject.AddComponent(); component = ((Component)val3).GetComponent(); } ((MonoBehaviour)val3).StartCoroutine(PlayingRotateCoroutine(component, clipId)); } } [ServerRpc(RequireOwnership = false)] public void PlayStomachacheClipServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1382913387u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1382913387u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayStomachacheClipClientRpc(playerId); } } } [ClientRpc] public void PlayStomachacheClipClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(598479981u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 598479981u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartOfRound.Instance.allPlayerScripts[playerId].movementAudio.PlayOneShot(Assets.StomachacheClips[Random.Range(0, Assets.StomachacheClips.Count)]); } } } [ServerRpc(RequireOwnership = false)] public void SpawnKKItemServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1770519305u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1770519305u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Vector3 val3 = ((Component)StartOfRound.Instance.allPlayerScripts[playerId]).transform.position + new Vector3(0f, 0.5f, 0f); GameObject val4 = Object.Instantiate(Assets.KkItem.spawnPrefab, val3, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val4.GetComponent().fallTime = 0f; val4.GetComponent().Spawn(false); val4.GetComponent().FallToGround(true, true, default(Vector3)); SpawnKKItemClientRpc(Random.Range(0, 2), playerId); } } } [ClientRpc] public void SpawnKKItemClientRpc(int clipNbr, 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2390029724u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipNbr); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2390029724u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { val3.movementAudio.PlayOneShot(Assets.FartClips[clipNbr]); } } } [ServerRpc(RequireOwnership = false)] public void UseShieldServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1853947787u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1853947787u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (PlayerControllerBPatch.ShieldDict.ContainsKey((uint)playerId)) { UseShieldClientRpc(playerId); } } } [ClientRpc] public void UseShieldClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(100655894u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 100655894u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.health < 20) { val3.health = 20; } val3.isPlayerDead = false; val3.MakeCriticallyInjured(false); if (((NetworkBehaviour)val3).IsOwner) { HUDManager.Instance.UpdateHealthUI(val3.health, false); } } } [ServerRpc(RequireOwnership = false)] public void PlayJsuisouClipServerRpc(ulong cardId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1697811556u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, cardId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1697811556u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayJsuisouClipClientRpc(cardId); } } } [ClientRpc] public void PlayJsuisouClipClientRpc(ulong cardId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1923514367u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, cardId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1923514367u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong cardId2 = cardId; TarotBehaviour val3 = ((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)((TarotBehaviour tarotBehaviour) => (Object)(object)tarotBehaviour != (Object)null && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject) && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject.GetComponent()) && ((Component)tarotBehaviour).gameObject.GetComponent().NetworkObjectId == cardId2)); if (!((Object)(object)val3 == (Object)null)) { AudioSource component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.PlayOneShot(Assets.JeSuisOuClip); } } } [ClientRpc] public void PlayPlusTardClipClientRpc(ulong cardId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4188667060u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, cardId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4188667060u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong cardId2 = cardId; TarotBehaviour val3 = ((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)((TarotBehaviour tarotBehaviour) => (Object)(object)tarotBehaviour != (Object)null && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject) && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject.GetComponent()) && ((Component)tarotBehaviour).gameObject.GetComponent().NetworkObjectId == cardId2)); if (!((Object)(object)val3 == (Object)null)) { AudioSource component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.PlayOneShot(Assets.PlusTardClip); } } } [ClientRpc] public void DiscoStartClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1698518334u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1698518334u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { DiscoComponent discoComponent = ((Component)val3).GetComponent(); if ((Object)(object)discoComponent == (Object)null) { discoComponent = ((Component)val3).gameObject.AddComponent(); } ((MonoBehaviour)val3).StartCoroutine(StartDiscoCoroutine(discoComponent)); } } [ServerRpc(RequireOwnership = false)] public void PlayFauxServerRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(33152235u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 33152235u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayFauxClientRpc(pos); } } } [ClientRpc] public void PlayFauxClientRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3924250863u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3924250863u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(PlayerControllerBPatch.WaitAndPlay(pos)); } } } private static IEnumerator StartDiscoCoroutine(DiscoComponent rot) { yield return (object)new WaitForFixedUpdate(); rot.StartDisco(); } private static IEnumerator PlayingRotateCoroutine(RotateComponent rot, int clip) { yield return (object)new WaitForFixedUpdate(); rot.PlayClip(clip); } private static IEnumerator PlayingCoroutine(SpectrumComponent spec, int clip) { yield return (object)new WaitForFixedUpdate(); spec.PlayMusic(clip); } private IEnumerator StartRotatingCoroutine(RotateComponent rotateComponent) { yield return (object)new WaitForFixedUpdate(); rotateComponent.StartRotating(); } private static IEnumerator WaitAndScare() { yield return (object)new WaitForSeconds(Random.Range(1f, 120f)); Assets.JumpscareObj.GetComponent()?.PlayOnScreen(); } [HarmonyPatch(typeof(StartOfRound), "Awake")] [HarmonyPostfix] private static void SpawnNetHandler() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { Object.Instantiate(_networkPrefab, Vector3.zero, Quaternion.identity).GetComponent().Spawn(false); } } [HarmonyPatch(typeof(GameNetworkManager), "Start")] [HarmonyPostfix] private static void Init() { if (!((Object)(object)_networkPrefab != (Object)null)) { _networkPrefab = Assets.planBundle.LoadAsset("Assets/PlanNetwork.prefab"); _networkPrefab.AddComponent(); NetworkManager.Singleton.AddNetworkPrefab(_networkPrefab); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1378493341u, new RpcReceiveHandler(__rpc_handler_1378493341), "NScareServerRpc"); ((NetworkBehaviour)this).__registerRpc(2896976942u, new RpcReceiveHandler(__rpc_handler_2896976942), "NScareClientRpc"); ((NetworkBehaviour)this).__registerRpc(1751953266u, new RpcReceiveHandler(__rpc_handler_1751953266), "SpectrumServerRpc"); ((NetworkBehaviour)this).__registerRpc(4180565523u, new RpcReceiveHandler(__rpc_handler_4180565523), "SpectrumClientRpc"); ((NetworkBehaviour)this).__registerRpc(581288842u, new RpcReceiveHandler(__rpc_handler_581288842), "RotateServerRpc"); ((NetworkBehaviour)this).__registerRpc(2509764208u, new RpcReceiveHandler(__rpc_handler_2509764208), "RotateClientRpc"); ((NetworkBehaviour)this).__registerRpc(3337105690u, new RpcReceiveHandler(__rpc_handler_3337105690), "PlayRotateClipServerRpc"); ((NetworkBehaviour)this).__registerRpc(4253895879u, new RpcReceiveHandler(__rpc_handler_4253895879), "PlayRotateClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(1382913387u, new RpcReceiveHandler(__rpc_handler_1382913387), "PlayStomachacheClipServerRpc"); ((NetworkBehaviour)this).__registerRpc(598479981u, new RpcReceiveHandler(__rpc_handler_598479981), "PlayStomachacheClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(1770519305u, new RpcReceiveHandler(__rpc_handler_1770519305), "SpawnKKItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(2390029724u, new RpcReceiveHandler(__rpc_handler_2390029724), "SpawnKKItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(1853947787u, new RpcReceiveHandler(__rpc_handler_1853947787), "UseShieldServerRpc"); ((NetworkBehaviour)this).__registerRpc(100655894u, new RpcReceiveHandler(__rpc_handler_100655894), "UseShieldClientRpc"); ((NetworkBehaviour)this).__registerRpc(1697811556u, new RpcReceiveHandler(__rpc_handler_1697811556), "PlayJsuisouClipServerRpc"); ((NetworkBehaviour)this).__registerRpc(1923514367u, new RpcReceiveHandler(__rpc_handler_1923514367), "PlayJsuisouClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(4188667060u, new RpcReceiveHandler(__rpc_handler_4188667060), "PlayPlusTardClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(1698518334u, new RpcReceiveHandler(__rpc_handler_1698518334), "DiscoStartClientRpc"); ((NetworkBehaviour)this).__registerRpc(33152235u, new RpcReceiveHandler(__rpc_handler_33152235), "PlayFauxServerRpc"); ((NetworkBehaviour)this).__registerRpc(3924250863u, new RpcReceiveHandler(__rpc_handler_3924250863), "PlayFauxClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1378493341(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).NScareServerRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2896976942(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).NScareClientRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1751953266(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; ((Networker)(object)target).SpectrumServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4180565523(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 clip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clip); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpectrumClientRpc(playerId, clip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_581288842(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; ((Networker)(object)target).RotateServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2509764208(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; ((Networker)(object)target).RotateClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3337105690(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 clipId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayRotateClipServerRpc(playerId, clipId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4253895879(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 clipId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayRotateClipClientRpc(playerId, clipId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1382913387(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; ((Networker)(object)target).PlayStomachacheClipServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_598479981(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; ((Networker)(object)target).PlayStomachacheClipClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1770519305(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; ((Networker)(object)target).SpawnKKItemServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2390029724(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 clipNbr = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipNbr); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpawnKKItemClientRpc(clipNbr, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1853947787(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; ((Networker)(object)target).UseShieldServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_100655894(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; ((Networker)(object)target).UseShieldClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1697811556(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) { ulong cardId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref cardId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayJsuisouClipServerRpc(cardId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1923514367(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) { ulong cardId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref cardId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayJsuisouClipClientRpc(cardId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4188667060(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) { ulong cardId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref cardId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayPlusTardClipClientRpc(cardId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1698518334(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; ((Networker)(object)target).DiscoStartClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_33152235(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayFauxServerRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3924250863(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PlayFauxClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Networker"; } } public class SpawnRarity { private readonly Dictionary rarities = new Dictionary(); private readonly Item item; private int defaultValue; public SpawnRarity(int baseValue, Item itemIn) { item = itemIn; defaultValue = baseValue; foreach (Planet value in Enum.GetValues(typeof(Planet))) { rarities.Add(value, baseValue); } } public int GetRarityFor(Planet planet) { return rarities[planet]; } public int GetRarityFor(int planet) { return rarities.Values.ToList()[planet]; } public void SetValues(int experimentation = -1, int assurance = -1, int vow = -1, int march = -1, int offense = -1, int adamance = -1, int rend = -1, int dine = -1, int titan = -1, int artifice = -1, int embrion = -1) { rarities[Planet.EXPERIMENTATION] = experimentation; rarities[Planet.ASSURANCE] = assurance; rarities[Planet.VOW] = vow; rarities[Planet.MARCH] = march; rarities[Planet.OFFENSE] = offense; rarities[Planet.ADAMANCE] = adamance; rarities[Planet.REND] = rend; rarities[Planet.DINE] = dine; rarities[Planet.TITAN] = titan; rarities[Planet.ARTIFICE] = artifice; rarities[Planet.EMBRION] = embrion; } public void CopyRaritiesFrom(SpawnRarity other) { rarities[Planet.EXPERIMENTATION] = other.rarities[Planet.EXPERIMENTATION]; rarities[Planet.ASSURANCE] = other.rarities[Planet.ASSURANCE]; rarities[Planet.VOW] = other.rarities[Planet.VOW]; rarities[Planet.MARCH] = other.rarities[Planet.MARCH]; rarities[Planet.OFFENSE] = other.rarities[Planet.OFFENSE]; rarities[Planet.ADAMANCE] = other.rarities[Planet.ADAMANCE]; rarities[Planet.REND] = other.rarities[Planet.REND]; rarities[Planet.DINE] = other.rarities[Planet.DINE]; rarities[Planet.TITAN] = other.rarities[Planet.TITAN]; rarities[Planet.ARTIFICE] = other.rarities[Planet.ARTIFICE]; rarities[Planet.EMBRION] = other.rarities[Planet.EMBRION]; } public void Multiply(float factor) { foreach (Planet item in rarities.Keys.ToList()) { rarities[item] = (int)((float)rarities[item] * factor); } } public SpawnableItemWithRarity GetSpawnableItemForPlanet(Planet planet) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return new SpawnableItemWithRarity(item, AccessRaritySafe((int)planet)); } public SpawnableItemWithRarity GetSpawnableItemForPlanet(int planet) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return new SpawnableItemWithRarity(item, AccessRaritySafe(planet)); } private int AccessRaritySafe(int planet) { try { return (rarities.Values.ToList()[planet] < 0) ? defaultValue : rarities.Values.ToList()[planet]; } catch (Exception) { } return defaultValue; } public void ApplySpawnRarity(SelectableLevel level) { level.spawnableScrap.Add(GetSpawnableItemForPlanet(level.levelID)); } } public enum Planet { EXPERIMENTATION, ASSURANCE, VOW, GORDION, MARCH, ADAMANCE, REND, DINE, OFFENSE, TITAN, ARTIFICE, LIQUIDATION, EMBRION } public static class PlayerDistortionManager { [CanBeNull] public static AudioDistortionFilter GetFilterForPlayer(PlayerControllerB player) { if ((Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource) && !RefreshDistortionFilter(player)) || (Object)(object)player.currentVoiceChatAudioSource == (Object)null) { return null; } AudioDistortionFilter component = ((Component)player.currentVoiceChatAudioSource).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { return component; } return (!RefreshDistortionFilter(player)) ? null : ((Component)player.currentVoiceChatAudioSource).GetComponent(); } private static bool RefreshDistortionFilter(PlayerControllerB player) { if (Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if (Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { return false; } AudioDistortionFilter component = ((Component)player.currentVoiceChatAudioSource).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { return (Object)(object)component != (Object)null; } component = ((Component)player.currentVoiceChatAudioSource).gameObject.AddComponent(); if (Object.op_Implicit((Object)(object)component)) { component.distortionLevel = 0f; } return (Object)(object)component != (Object)null; } } } namespace LCPlanAssassin.TarotCard { public class DiscoCard : Card { public DiscoCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.DiscoMat; } public override Material GetCardBurn() { return Materials.BurnPurple; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { if (!playerWhoDrew.isPlayerControlled || playerWhoDrew.isPlayerDead) { return ""; } DiscoComponent component = ((Component)playerWhoDrew).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.DiscoActive) { return "Toujours plus !"; } ModBase.Instance.logger.LogDebug((object)("Networker status : " + Object.op_Implicit((Object)(object)Networker.Instance) + " - " + ((NetworkBehaviour)Networker.Instance).IsSpawned + " - " + ((NetworkBehaviour)Networker.Instance).IsClient + " - " + ((NetworkBehaviour)Networker.Instance).IsServer + " - " + ((NetworkBehaviour)Networker.Instance).IsHost)); Networker.Instance.DiscoStartClientRpc((int)playerWhoDrew.playerClientId); return "Let's dance !"; } public override string GetCardName() { return "Disco"; } } public class PlusTardCard : Card { public PlusTardCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.PlusTardMat; } public override Material GetCardBurn() { return Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { if (playerWhoDrew.isPlayerDead || !playerWhoDrew.isPlayerControlled) { return ""; } Networker.Instance.PlayPlusTardClipClientRpc(((Component)base.cardAudio).gameObject.GetComponent().NetworkObjectId); ((MonoBehaviour)playerWhoDrew).StartCoroutine(WaitEffect(playerWhoDrew)); return "Hahahahaha !"; } private static IEnumerator WaitEffect(PlayerControllerB player) { yield return (object)new WaitForSeconds(3.5f); Networker.Instance.TeleportPlayerServerRpc((int)player.playerClientId, GetRandomNode(!player.isInsideFactory), !player.isInsideFactory, false); } private static Vector3 GetRandomNode(bool inside) { //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_002e: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = GameObject.FindGameObjectsWithTag(inside ? "AINode" : "OutsideAINode"); return array[Random.Range(0, array.Length)].transform.position; } public override string GetCardName() { return "On se retrouvera plus tard"; } } public class JsuisouCard : Card { public JsuisouCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.JsuiouMat; } public override Material GetCardBurn() { return Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (playerWhoDrew.isPlayerDead || !playerWhoDrew.isPlayerControlled) { return ""; } Networker.Instance.TeleportPlayerServerRpc((int)playerWhoDrew.playerClientId, GetFarthestNodeFromLocation(((Component)playerWhoDrew).transform.position, playerWhoDrew.isInsideFactory).transform.position, playerWhoDrew.isInsideFactory, false); Networker.Instance.PlayJsuisouClipClientRpc(((Component)base.cardAudio).gameObject.GetComponent().NetworkObjectId); return "Ah j'suis où ?"; } public override string GetCardName() { return "Je suis où"; } public static GameObject GetFarthestNodeFromLocation(Vector3 location, bool inside) { //IL_005a: 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) if (StartOfRound.Instance.currentLevel.levelID == 3) { return ((Component)StartOfRound.Instance.playerSpawnPositions[0]).gameObject; } GameObject[] array = GameObject.FindGameObjectsWithTag(inside ? "AINode" : "OutsideAINode"); GameObject result = null; float num = 0f; GameObject[] array2 = array; foreach (GameObject val in array2) { float num2 = Vector3.Distance(location, val.transform.position); if ((double)num2 > (double)num) { num = num2; result = val; } } return result; } } public class NWordCard : Card { public NWordCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.NWordMat; } public override Material GetCardBurn() { return Assets.OrangeBurn; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { List list = new List(); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if (!val.isPlayerDead && val.isPlayerControlled) { list.Add(i); } } if (list.Count == 0) { ModBase.Instance.logger.LogDebug((object)"No players to scare"); return ""; } PlayerControllerB val2 = StartOfRound.Instance.allPlayerScripts[list[Random.Range(0, list.Count)]]; ModBase.Instance.logger.LogDebug((object)("Chose player : " + val2.playerUsername)); Networker.Instance.NScareServerRpc((int)val2.playerClientId); return "What can I say except..."; } public override string GetCardName() { return "The N Word"; } } public class RotateCard : Card { public RotateCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.RotateMat; } public override Material GetCardBurn() { return Materials.BurnWhite; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { if (!playerWhoDrew.isPlayerControlled || playerWhoDrew.isPlayerDead) { return ""; } RotateComponent component = ((Component)playerWhoDrew).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.canRotate) { return "Tu es déjà en train de tourner !"; } Networker.Instance.RotateServerRpc((int)playerWhoDrew.playerClientId); return "No scope !"; } public override string GetCardName() { return "Les 360 maudits"; } } public class SpectrumCard : Card { public SpectrumCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.SpectrumMat; } public override Material GetCardBurn() { return Materials.BurnPurple; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { if (!playerWhoDrew.isPlayerControlled || playerWhoDrew.isPlayerDead) { return ""; } SpectrumComponent component = ((Component)playerWhoDrew).GetComponent(); if ((Object)(object)component != (Object)null && component.IsPlaying()) { return "C'est pas assez pour toi ?"; } Networker.Instance.SpectrumServerRpc((int)playerWhoDrew.playerClientId); return "Tududu du tududu du"; } public override string GetCardName() { return "Spectrum"; } } public class TheMoolCard : Card { public TheMoolCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.TheMoolMat; } public override Material GetCardBurn() { return Materials.BurnAqua; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0011: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) GameObject val = Object.Instantiate(Assets.OysterItem.spawnPrefab, ((Component)playerWhoDrew).transform.position, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; val.GetComponent().Spawn(false); component.FallToGround(false, true, default(Vector3)); return "J'ai eu : The Mool"; } public override string GetCardName() { return "The Mool"; } public override IEnumerator CardPullingCoroutine() { base.cardAudio.PlayOneShot(Assets.PullCardClips[Random.Range(0, Assets.PullCardClips.Count)]); yield return (object)new WaitForSeconds(1.5f); base.cardAudio.Stop(); yield return (object)new WaitForSeconds(0.7f); base.cardAudio.PlayOneShot(Assets.TheMoolClip); Renderer cardRenderer = base.cardPrefab.GetComponent(); Material initMat0 = cardRenderer.materials[0]; Material initMat1 = cardRenderer.materials[1]; Material initMat2 = cardRenderer.materials[2]; float delta = 0f; while (delta < 0.3f) { cardRenderer.materials[0].Lerp(initMat0, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[1].Lerp(initMat1, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[2].Lerp(initMat2, ((Card)this).GetCardBurn(), delta / 0.3f); delta += Time.deltaTime; yield return null; } yield return (object)new WaitForSeconds(0.2f); Vector3 initScale = base.cardPrefab.transform.localScale; float delta2 = 0f; while (delta2 < 0.3f) { base.cardPrefab.transform.localScale = initScale * (1f - Card.ControlCurve.Evaluate(delta2 / 0.3f)); delta2 += Time.deltaTime; yield return null; } base.cardPrefab.transform.localScale = Vector3.zero; } } } namespace LCPlanAssassin.Patchers { [HarmonyPatch(typeof(CozyLights))] public class CozyLightsPatch { [HarmonyPatch("SetAudio")] [HarmonyPrefix] private static void SetAudioPatch(CozyLights __instance, ref bool ___cozyLightsOn) { if (!((Object)(object)((Component)__instance).gameObject.transform.parent != (Object)null) || !((Object)(object)((Component)__instance).gameObject.transform.parent.parent != (Object)null) || !((Object)(object)((Component)((Component)__instance).gameObject.transform.parent.parent).GetComponent() == (Object)null)) { DiscoComponent component = ((Component)((Component)__instance).gameObject.transform.parent.parent).GetComponent(); ___cozyLightsOn = component.DiscoActive; } } } [HarmonyPatch(typeof(TVScript))] internal class PatchTV { private static bool _hasPatched; [HarmonyPatch("Update")] [HarmonyPrefix] public static void PatchUpdate(TVScript __instance) { if (!_hasPatched) { _hasPatched = true; AudioClip[] array = (AudioClip[])(object)new AudioClip[__instance.tvAudioClips.Length + 1]; VideoClip[] array2 = (VideoClip[])(object)new VideoClip[__instance.tvClips.Length + 1]; for (int i = 0; i < __instance.tvAudioClips.Length; i++) { array[i] = __instance.tvAudioClips[i]; } for (int j = 0; j < __instance.tvClips.Length; j++) { array2[j] = __instance.tvClips[j]; } array[^1] = Assets.TintinAudio; array2[^1] = Assets.TintinClip; __instance.tvAudioClips = array; __instance.tvClips = array2; } } } [HarmonyPatch(typeof(StunGrenadeItem))] public class StunGrenadePatch { public static readonly Dictionary boomPositions = new Dictionary(); [HarmonyPatch("ExplodeStunGrenade")] [HarmonyPrefix] private static void ExplodeStunGrenadePatch(StunGrenadeItem __instance, ref bool ___explodeOnThrow) { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair boomPosition in boomPositions) { float num = Time.time - boomPosition.Key; if (num > 5f) { boomPositions.Remove(boomPosition.Key); } } if (!__instance.hasExploded && (!(__instance.chanceToExplode < 100f) || ___explodeOnThrow) && __instance.spawnDamagingShockwave) { boomPositions[Time.time] = ((Component)__instance).transform.position; } } } [HarmonyPatch(typeof(ItemDropship))] public class ItemDropshipPatch { private static readonly List itemToDeliver = new List(); private static readonly List itemInDelivery = new List(); [HarmonyPatch("OpenShipDoorsOnServer")] [HarmonyPrefix] private static void OpenDoorPatch(ItemDropship __instance) { //IL_0020: 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) for (int i = 0; i < itemInDelivery.Count; i++) { GameObject val = Object.Instantiate(itemInDelivery[i].spawnPrefab, __instance.itemSpawnPositions[i % 4].position, Quaternion.identity); val.GetComponent().fallTime = 0f; val.GetComponent().Spawn(true); } itemInDelivery.Clear(); } [HarmonyPatch("Update")] [HarmonyPrefix] private static void UpdatePatch(ItemDropship __instance, ref Terminal ___terminalScript, ref StartOfRound ___playersManager) { if (((NetworkBehaviour)__instance).IsServer && !__instance.deliveringOrder && ___terminalScript.orderedItemsFromTerminal.Count <= 0 && ___playersManager.shipHasLanded && itemToDeliver.Count > 0) { if ((double)__instance.shipTimer > 40.0) { LandShipOnServer(__instance); } __instance.shipTimer += Time.deltaTime; } } private static void LandShipOnServer(ItemDropship drop) { drop.shipTimer = 0f; itemInDelivery.Clear(); itemInDelivery.AddRange(itemToDeliver); itemToDeliver.Clear(); drop.playersFirstOrder = false; drop.deliveringOrder = true; drop.LandShipClientRpc(); } public static void DeliverItemServer(Item item) { itemToDeliver.Add(item); } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerControllerBPatch { public static readonly Dictionary SausageDict = new Dictionary(); public static readonly Dictionary CamUpDict = new Dictionary(); public static readonly Dictionary ShieldDict = new Dictionary(); public static readonly Dictionary ConditionForEmoteDict = new Dictionary(); [HarmonyPatch("Update")] [HarmonyPrefix] internal static void ModifySpeed(PlayerControllerB __instance, ref float ___cameraUp, ref bool ___isJumping, ref bool ___isWalking) { if (!__instance.inSpecialInteractAnimation && !__instance.isPlayerDead && !___isJumping && !___isWalking && !__instance.isCrouching && !__instance.isClimbingLadder && !__instance.isGrabbingObjectAnimation && !__instance.inTerminalMenu && !__instance.isTypingChat) { ConditionForEmoteDict[__instance.playerClientId] = true; } else { ConditionForEmoteDict[__instance.playerClientId] = false; } if (CamUpDict.ContainsKey(__instance.playerClientId)) { float num = CamUpDict[__instance.playerClientId]; if (Mathf.Abs(num) > 0.1f) { ___cameraUp += num; CamUpDict.Remove(__instance.playerClientId); } } if (SausageDict.TryGetValue(__instance.playerClientId, out var value)) { if ((double)(Time.time - value) >= 40.0) { SausageDict.Remove(__instance.playerClientId); __instance.movementSpeed = 4.6f; } else { __instance.movementSpeed = 6.3f; } } } [HarmonyPatch("KillPlayer")] [HarmonyPrefix] private unsafe static bool KillPlayerPrePatch(PlayerControllerB __instance, CauseOfDeath causeOfDeath) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 if (!((NetworkBehaviour)__instance).IsOwner || !ShieldDict.ContainsKey(__instance.playerClientId) || (int)causeOfDeath == 2 || (int)causeOfDeath == 10) { return true; } int num = ShieldDict[__instance.playerClientId]; if (num <= 0) { return true; } ShieldDict[__instance.playerClientId] = num - 1; if ((Object)(object)__instance == (Object)(object)GameNetworkManager.Instance.localPlayerController) { HUDManager.Instance.DisplayTip("Shield", "Votre s'est rompu, il vous en reste " + ShieldDict[__instance.playerClientId], false, false, "LC_Tip1"); ModBase.Instance.logger.LogDebug((object)("Death reason : " + ((object)(*(CauseOfDeath*)(&causeOfDeath))/*cast due to .constrained prefix*/).ToString())); } Networker.Instance.UseShieldServerRpc((int)__instance.playerClientId); return false; } [HarmonyPatch("DamagePlayer")] [HarmonyPrefix] private static bool DamagePlayerPrePatch(PlayerControllerB __instance) { if (!((NetworkBehaviour)__instance).IsOwner || !ShieldDict.ContainsKey(__instance.playerClientId)) { return true; } int num = ShieldDict[__instance.playerClientId]; if (num <= 0) { return true; } ShieldDict[__instance.playerClientId] = num - 1; if ((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return false; } HUDManager.Instance.DisplayTip("Shield", "Votre s'est rompu, il vous en reste " + ShieldDict[__instance.playerClientId], false, false, "LC_Tip1"); Networker.Instance.UseShieldServerRpc((int)__instance.playerClientId); return false; } [HarmonyPatch("KillPlayer")] [HarmonyPostfix] private static void KillPlayerPatch(PlayerControllerB __instance, CauseOfDeath causeOfDeath) { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Invalid comparison between Unknown and I4 //IL_00d7: 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_013e: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerDead || !__instance.AllowPlayerDeath()) { return; } AudioDistortionFilter filterForPlayer = PlayerDistortionManager.GetFilterForPlayer(__instance); if (Object.op_Implicit((Object)(object)filterForPlayer)) { filterForPlayer.distortionLevel = 0f; } if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent())) { ((Component)__instance).GetComponent().UpgradeQuality(); } if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent())) { ((Component)__instance).GetComponent().StopMusic(); } if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent())) { ((Component)__instance).GetComponent().StopRotating(); } if ((int)causeOfDeath != 3) { return; } foreach (KeyValuePair boomPosition in StunGrenadePatch.boomPositions) { float num = Time.time - boomPosition.Key; float num2 = Vector3.Distance(boomPosition.Value, ((Component)__instance).transform.position); if (num < 0.3f && num2 < 20f) { if ((Object)(object)Assets.LeFauxClip == (Object)null) { ModBase.Instance.logger.LogWarning((object)"LeFauxClip null"); break; } Networker.Instance.PlayFauxServerRpc(boomPosition.Value); } } } public static IEnumerator WaitAndPlay(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TempAudio"); val.transform.position = pos; GameObject obj = val; AudioSource source = obj.AddComponent(); source.clip = Assets.LeFauxClip; source.volume = 1f; source.spatialBlend = 1f; source.spread = 45f; source.minDistance = 3f; source.maxDistance = 30f; AudioDistortionFilter filter = obj.AddComponent(); filter.distortionLevel = 0.6f; yield return (object)new WaitForSeconds(0.25f); source.Play(); Object.Destroy((Object)(object)obj, Assets.LeFauxClip.length + 1f); } } [HarmonyPatch(typeof(RoundManager))] public class RoundManagerPatch { [HarmonyPatch("GenerateNewFloor")] [HarmonyPostfix] public static void GenerateNewFloorPatch() { List list = new List(); list.AddRange(SoundManager.Instance.currentLevelAmbience.insideAmbience); list.AddRange(Assets.ScreamClips); SoundManager.Instance.currentLevelAmbience.insideAmbience = list.ToArray(); } } [HarmonyPatch(typeof(Terminal))] public class TerminalPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void UpdatePatch(Terminal __instance) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && !((Object)(object)((Component)localPlayerController).GetComponent() == (Object)null)) { LowQComponent component = ((Component)localPlayerController).GetComponent(); if (!((Object)(object)component.lowQTexture == (Object)null) && component.IsLowQ() && !((Object)(object)HUDManager.Instance == (Object)null) && !((Object)(object)HUDManager.Instance.playerScreenTexture == (Object)null) && !((Object)(object)HUDManager.Instance.playerScreenTexture.texture == (Object)null) && !((Object)(object)localPlayerController.gameplayCamera == (Object)null) && !((Object)(object)localPlayerController.gameplayCamera.targetTexture == (Object)null)) { HUDManager.Instance.playerScreenTexture.texture = (Texture)(object)component.lowQTexture; localPlayerController.gameplayCamera.targetTexture = component.lowQTexture; } } } } } namespace LCPlanAssassin.Components { public class DiscoComponent : MonoBehaviour { private GameObject discoBall; private CozyLights discoController; private PlayerControllerB player; public bool DiscoActive { get; private set; } private void Awake() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) discoBall = Object.Instantiate(Assets.DiscoBall, ((Component)this).gameObject.transform, true); discoController = discoBall.GetComponentInChildren(); discoBall.transform.localPosition = new Vector3(0f, 3f, 0f); DiscoActive = false; } private void Start() { player = ((Component)this).GetComponent(); SetLights(state: false); } public void StartDisco() { if (!((Object)(object)discoController == (Object)null)) { SetLights(state: true); DiscoActive = true; } } public void StopDisco() { if (!((Object)(object)discoController == (Object)null)) { SetLights(state: false); DiscoActive = false; } } private void SetLights(bool state) { ((Behaviour)((Component)discoBall.transform.GetChild(0).GetChild(0).GetChild(0)).gameObject.GetComponent()).enabled = state; ((Behaviour)((Component)discoBall.transform.GetChild(0).GetChild(0).GetChild(1)).gameObject.GetComponent()).enabled = state; } private void Update() { //IL_0078: 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_0097: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)discoController == (Object)null) { return; } if ((Object)(object)player == (Object)null || player.isPlayerDead || !player.isPlayerControlled || !StartOfRound.Instance.shipHasLanded || StartOfRound.Instance.inShipPhase) { StopDisco(); } if (DiscoActive) { Transform transform = discoBall.transform; transform.localEulerAngles += new Vector3(0f, 18f * Time.deltaTime, 0f); } if (DiscoActive && (Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController && PlayerControllerBPatch.ConditionForEmoteDict.ContainsKey(player.playerClientId) && PlayerControllerBPatch.ConditionForEmoteDict[player.playerClientId]) { if (player.performingEmote && (player.playerBodyAnimator.GetInteger("emoteNumber") == 1 || player.timeSinceStartingEmote < 1f)) { return; } player.playerBodyAnimator.SetInteger("emoteNumber", 1); player.StartPerformingEmoteServerRpc(); player.performingEmote = true; player.timeSinceStartingEmote = 0f; } discoController.SetAudio(); } private static string GetObjectHierarchyDebug(GameObject obj) { string text = ""; text = text + ((Object)obj).name + ", " + obj.activeInHierarchy + ", " + obj.GetComponents().Length + " components\n"; text += "Components: "; text = obj.GetComponents().Aggregate(text, (string current, Behaviour component) => current + ((object)component).GetType().Name + " - " + component.enabled + ", "); text += "\n"; return (obj.transform.childCount == 0) ? text : ((IEnumerable)obj.transform).Cast().Aggregate(text, (string current, Transform child) => current + "-- " + GetObjectHierarchyDebug(((Component)child).gameObject)); } } public class LowFPSComponent : MonoBehaviour { private PlayerControllerB targetPlayer; private int orignalFPS; private int originalVSync; public int targetFPS = 10; public bool IsActive { get; private set; } private void Start() { if (!((Object)(object)((Component)this).GetComponent() == (Object)null)) { targetPlayer = ((Component)this).GetComponent(); if (!((Object)(object)targetPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) && !targetPlayer.isPlayerDead && targetPlayer.isPlayerControlled) { orignalFPS = Application.targetFrameRate; originalVSync = QualitySettings.vSyncCount; } } } private bool IsStateCorrect() { return (Object)(object)targetPlayer != (Object)null && (Object)(object)targetPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController && !targetPlayer.isPlayerDead && targetPlayer.isPlayerControlled; } private void Update() { if ((!IsStateCorrect() || !IsActive) && IsActive) { Disable(); } } public void SetActive(bool active) { if (IsStateCorrect()) { if (active) { QualitySettings.vSyncCount = 0; Application.targetFrameRate = targetFPS; } else { QualitySettings.vSyncCount = originalVSync; Application.targetFrameRate = orignalFPS; } IsActive = active; } } private void Disable() { QualitySettings.vSyncCount = 0; Application.targetFrameRate = orignalFPS; IsActive = false; } } public class LowQComponent : MonoBehaviour { private PlayerControllerB player; private bool isLowQ = false; private readonly int lowQWidth = 215; private readonly int lowQHeight = 130; public RenderTexture lowQTexture { get; private set; } public RenderTexture defaultTexture { get; private set; } private void Start() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown if (!((Object)(object)((Component)this).GetComponent() == (Object)null)) { player = ((Component)this).GetComponent(); if (!((Object)(object)player != (Object)(object)GameNetworkManager.Instance.localPlayerController) && !player.isPlayerDead && player.isPlayerControlled) { defaultTexture = player.gameplayCamera.targetTexture; lowQTexture = new RenderTexture(lowQWidth, lowQHeight, defaultTexture.depth); } } } public void DowngradeQuality() { player.gameplayCamera.targetTexture = lowQTexture; HUDManager.Instance.playerScreenTexture.texture = (Texture)(object)lowQTexture; isLowQ = true; } public void UpgradeQuality() { player.gameplayCamera.targetTexture = defaultTexture; HUDManager.Instance.playerScreenTexture.texture = (Texture)(object)defaultTexture; isLowQ = false; } public bool IsLowQ() { return isLowQ; } private void OnDestroy() { if (!((Object)(object)lowQTexture == (Object)null)) { lowQTexture.Release(); } } private void OnDisable() { if (!((Object)(object)lowQTexture == (Object)null)) { lowQTexture.Release(); } } } public class RotateComponent : MonoBehaviour { private PlayerControllerB player; private AudioSource audioSource; private bool isRotating = false; internal bool canRotate = false; private float nextRotationTime = 0f; private void Start() { audioSource = ((Component)this).gameObject.AddComponent(); ((Object)audioSource).name = "RotateAudioSource"; audioSource.loop = false; audioSource.volume = 0.7f; audioSource.spatialBlend = 1f; audioSource.dopplerLevel = 0.45f; audioSource.spread = 40f; audioSource.rolloffMode = (AudioRolloffMode)1; audioSource.minDistance = 3f; audioSource.maxDistance = 35f; player = ((Component)this).GetComponent(); nextRotationTime = Time.time + Random.Range(2f, 10f); } private bool IsPlayerValid() { return (Object)(object)player != (Object)null && player.isPlayerControlled && !player.isPlayerDead && (Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController; } private void Update() { if (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded || !IsPlayerValid()) { if (canRotate) { StopRotating(); } } else if (canRotate && !isRotating && ((NetworkBehaviour)player).IsOwner && !((double)Time.time < (double)nextRotationTime)) { nextRotationTime = Time.time + Random.Range(2f, 10f); Networker.Instance.PlayRotateClipServerRpc((int)player.playerClientId, Random.Range(0, Assets.RotateClips.Count)); ((MonoBehaviour)this).StartCoroutine(RotateCoroutine()); } } public void StartRotating() { if (IsPlayerValid()) { canRotate = true; } } public void StopRotating() { if (isRotating) { ((MonoBehaviour)this).StopCoroutine(RotateCoroutine()); isRotating = false; } canRotate = false; } public void PlayClip(int clipId) { audioSource.PlayOneShot(Assets.RotateClips[clipId]); } private IEnumerator RotateCoroutine() { if (IsPlayerValid() && !player.inSpecialInteractAnimation) { isRotating = true; float elapsed = 0f; float totalAddedRotation = 0f; while (elapsed < 0.4f) { AddRotationToPlayer(new Vector3(0f, (float)(300.0 * (double)(Time.deltaTime / 0.4f)), 0f)); totalAddedRotation += (float)(300.0 * (double)(Time.deltaTime / 0.4f)); elapsed += Time.deltaTime; yield return null; } AddRotationToPlayer(new Vector3(0f, 0f - totalAddedRotation, 0f)); isRotating = false; } } private void AddRotationToPlayer(Vector3 rotation) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (player.jetpackControls) { player.jetpackTurnCompass.Rotate(rotation, (Space)1); } else { player.thisPlayerBody.Rotate(rotation, (Space)1); } Transform transform = ((Component)player.gameplayCamera).transform; transform.localEulerAngles += rotation; } } public class SpectrumComponent : MonoBehaviour { private AudioSource audioSource; private float lastNoise; private void Start() { audioSource = ((Component)this).gameObject.AddComponent(); ((Object)audioSource).name = "SpectrumAudioSource"; audioSource.loop = true; audioSource.volume = 0.7f; audioSource.spatialBlend = 1f; audioSource.dopplerLevel = 0.45f; audioSource.spread = 40f; audioSource.rolloffMode = (AudioRolloffMode)1; audioSource.minDistance = 3f; audioSource.maxDistance = 35f; } public void PlayMusic(int clip) { audioSource.clip = Assets.SpectrumMusics[clip]; audioSource.Play(); } public bool IsPlaying() { return (Object)(object)audioSource != (Object)null && audioSource.isPlaying; } public void StopMusic() { audioSource.Stop(); } private void Update() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) if (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded) { if (audioSource.isPlaying) { audioSource.Stop(); } } else if (!((double)Time.time - (double)lastNoise <= 2.0) && audioSource.isPlaying) { RoundManager.Instance.PlayAudibleNoise(((Component)this).gameObject.transform.position, 15f, 0.5f, 0, false, 0); lastNoise = Time.time; } } } public class StomachacheComponent : MonoBehaviour { private PlayerControllerB player; private float startTime; private float nextStomachGrowlTime; private float endTime; private float playerPitch = 1f; private bool finished; private void Start() { if (!((Object)(object)((Component)this).gameObject.GetComponent() == (Object)null)) { player = ((Component)this).gameObject.GetComponent(); startTime = Time.time + Random.Range(1f, 10f); nextStomachGrowlTime = Time.time + Random.Range(1f, 5f); endTime = startTime + Random.Range(25f, 60f); } } private void Update() { if ((Object)(object)player == (Object)null || !((NetworkBehaviour)player).IsOwner || player.isPlayerDead) { return; } if (finished || Time.time < startTime) { if ((double)playerPitch >= 1.0) { return; } playerPitch += Time.deltaTime * 0.5f; } else { if ((double)playerPitch > 0.5) { playerPitch -= Time.deltaTime * 0.5f; } player.sprintMeter = Mathf.Max(0f, player.sprintMeter - 0.2f * Time.deltaTime); player.drunknessInertia = Mathf.Clamp(player.drunknessInertia + Time.deltaTime / 1.75f * player.drunknessSpeed, 0.1f, 3f); if (Time.time >= nextStomachGrowlTime) { nextStomachGrowlTime = Time.time + Random.Range(1f, 5f); Networker.Instance.PlayStomachacheClipServerRpc((int)player.playerClientId); } if (Time.time >= endTime) { finished = true; Networker.Instance.SpawnKKItemServerRpc((int)player.playerClientId); player.drunknessInertia = 0f; } } playerPitch = Mathf.Clamp(playerPitch, 0.5f, 1f); } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace LCPlanAssassin.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }