Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LCPlanAssassin v2.9.0
plugins/LCPlanAssassin/LCPlanAssassin.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.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 LCTarrotCard.Util; using Unity.Netcode; using UnityEngine; using UnityEngine.Rendering.HighDefinition; 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.9.0")] [BepInDependency("LCTarotCard", "1.2.0")] 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Instance != (Object)null) { return; } Instance = this; harmony = new Harmony("LCPlanAssassin"); logger = Logger.CreateLogSource("LCPlanAssassin"); TestKey = new KeyboardShortcut((KeyCode)96, Array.Empty<KeyCode>()); Assets.LoadBundles(); if (HasError) { return; } harmony.PatchAll(); RPC_Init(); logger.LogInfo((object)"LCPlanAssassin correctly loaded"); if (ModConstants.TestMode) { for (int i = 0; i < 5; i++) { logger.LogError((object)"----------------------------------------------------------------"); } logger.LogError((object)"Test mode is enabled, please disable it before releasing the mod"); for (int j = 0; j < 5; j++) { logger.LogError((object)"----------------------------------------------------------------"); } } } 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.BourseItem.spawnPrefab, ((Component)__instance).transform.position); InstantiateAndReturnGrabbableObject(Assets.PlanAssassin.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<GameObject>(prefab, position, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; val.GetComponent<NetworkObject>().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.9.0"; internal static readonly bool TestMode; } } namespace LCPlanAssassin.AssetLoader { internal static class Assets { internal static AssetBundle planBundle; internal static AssetBundle heavyBundle; public static AudioClip EatClip; public static readonly List<AudioClip> PlanClips = new List<AudioClip>(); public static readonly List<AudioClip> KaquiteClips = new List<AudioClip>(); public static readonly List<AudioClip> KeyboardClips = new List<AudioClip>(); 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<VideoClip> ScreenClips = new List<VideoClip>(); public static AudioClip Comsau; public static List<AudioClip> SpringClips = new List<AudioClip>(); public static AudioClip RingtoneClip; public static List<VideoClip> TelClips = new List<VideoClip>(); 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<AudioClip> FartClips = new List<AudioClip>(); public static AudioClip SplatClip; public static AudioClip FluteClip; public static AudioClip BacteriaClip; public static AudioClip JetpackBroken; public static AudioClip JetPackThrustStart; public static Material OrangeBurn; public static AudioClip JeSuisOuClip; public static AudioClip TheMoolClip; public static List<AudioClip> RotateClips = new List<AudioClip>(); public static List<AudioClip> SpectrumMusics = new List<AudioClip>(); 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<VideoClip> NClips = new List<VideoClip>(); internal static GameObject JumpscareCanvas; public static GameObject JumpscareObj; public static readonly List<AudioClip> ScreamClips = new List<AudioClip>(); public static Item RouterItem; public static Item OysterItem; public static Item BolItem; public static Item BoosterItem; public static Item CheeseItem; public static List<AudioClip> StomachacheClips = new List<AudioClip>(); public static Item KkItem; public static Item AtiItem; public static Item ChopstickItem; public static Item FluteItem; public static Item LieDetectorItem; public static Item ChapeauItem; public static AudioClip LetsGoOnmyouji; public static GameObject HatComponent; public static Item BourseItem; public static AudioClip LeFauxClip; public static Dictionary<Type, int> TarotAssassinCards = new Dictionary<Type, int>(); public static Item TarotAssassin; public static Material TarotAssassinBack; 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 Material CookingCard; public static Material FlashCard; public static Material MelodieCard; public static List<AudioClip> Soundboards = new List<AudioClip>(); public static Material PlanAssassinCard; public static Material WoofCard; public static AudioClip BarkClip; public static AudioClip FartClip; 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 SpawnRarity TarotAssassinRarity; public static SpawnRarity ChapeauSpawnRarity; public static SpawnRarity BourseSpawnRarity; 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"); string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (directoryName != null) { heavyBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "planHeavyBundle")); if ((Object)(object)heavyBundle == (Object)null) { ModBase.Instance.logger.LogError((object)"Cannot load heavy assets bundle, bundle is null"); ModBase.HasError = true; } } else { ModBase.HasError = true; } 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<Item>("Assets/PlanAssassin.asset"); PlanAssassinBehaviour planAssassinBehaviour = PlanAssassin.spawnPrefab.AddComponent<PlanAssassinBehaviour>(); ((GrabbableObject)planAssassinBehaviour).grabbable = true; ((GrabbableObject)planAssassinBehaviour).grabbableToEnemies = false; ((GrabbableObject)planAssassinBehaviour).itemProperties = PlanAssassin; PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/ballon.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/cabane.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/camion.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/harbor.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/planassassin.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/temaplan.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/vandal.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/chien.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/monde.ogg")); PlanClips.Add(planBundle.LoadAsset<AudioClip>("Assets/SFX/pigeon.ogg")); Sausage = planBundle.LoadAsset<Item>("Assets/Sausage.asset"); SausageBehaviour sausageBehaviour = Sausage.spawnPrefab.AddComponent<SausageBehaviour>(); ((GrabbableObject)sausageBehaviour).grabbable = true; ((GrabbableObject)sausageBehaviour).grabbableToEnemies = true; ((GrabbableObject)sausageBehaviour).itemProperties = Sausage; PCRavix = planBundle.LoadAsset<Item>("Assets/PC/pc_ravix.asset"); PcRavixBehaviour pcRavixBehaviour = PCRavix.spawnPrefab.AddComponent<PcRavixBehaviour>(); ((GrabbableObject)pcRavixBehaviour).grabbable = true; ((GrabbableObject)pcRavixBehaviour).grabbableToEnemies = true; ((GrabbableObject)pcRavixBehaviour).itemProperties = PCRavix; SausageTicket = planBundle.LoadAsset<Item>("Assets/Ticket/ticket.asset"); SausageTicketBehaviour sausageTicketBehaviour = SausageTicket.spawnPrefab.AddComponent<SausageTicketBehaviour>(); ((GrabbableObject)sausageTicketBehaviour).grabbable = true; ((GrabbableObject)sausageTicketBehaviour).grabbableToEnemies = true; ((GrabbableObject)sausageTicketBehaviour).itemProperties = SausageTicket; MicroKaquite = planBundle.LoadAsset<Item>("Assets/Micro/casque.asset"); CasqueBehaviour casqueBehaviour = MicroKaquite.spawnPrefab.AddComponent<CasqueBehaviour>(); ((GrabbableObject)casqueBehaviour).grabbable = true; ((GrabbableObject)casqueBehaviour).grabbableToEnemies = true; ((GrabbableObject)casqueBehaviour).itemProperties = MicroKaquite; LeftHeadsetItem = planBundle.LoadAsset<Item>("Assets/Micro/casql.asset"); RightHeadsetItem = planBundle.LoadAsset<Item>("Assets/Micro/casqr.asset"); HandItem = planBundle.LoadAsset<Item>("Assets/Hand/Hand.asset"); HandBehaviour handBehaviour = HandItem.spawnPrefab.AddComponent<HandBehaviour>(); ((GrabbableObject)handBehaviour).grabbable = true; ((GrabbableObject)handBehaviour).grabbableToEnemies = true; ((GrabbableObject)handBehaviour).itemProperties = HandItem; KeyboardItem = planBundle.LoadAsset<Item>("Assets/Clavier/keyboard.asset"); KeyboardBehaviour keyboardBehaviour = KeyboardItem.spawnPrefab.AddComponent<KeyboardBehaviour>(); ((GrabbableObject)keyboardBehaviour).grabbable = true; ((GrabbableObject)keyboardBehaviour).grabbableToEnemies = true; ((GrabbableObject)keyboardBehaviour).itemProperties = KeyboardItem; KakahuetItem = planBundle.LoadAsset<Item>("Assets/kakahuet/kakahuet.asset"); KakahuetBehaviour kakahuetBehaviour = KakahuetItem.spawnPrefab.AddComponent<KakahuetBehaviour>(); ((GrabbableObject)kakahuetBehaviour).grabbable = true; ((GrabbableObject)kakahuetBehaviour).grabbableToEnemies = true; ((GrabbableObject)kakahuetBehaviour).itemProperties = KakahuetItem; MowerItem = planBundle.LoadAsset<Item>("Assets/mower/mower.asset"); MowerBehaviour mowerBehaviour = MowerItem.spawnPrefab.AddComponent<MowerBehaviour>(); ((GrabbableObject)mowerBehaviour).grabbable = true; ((GrabbableObject)mowerBehaviour).grabbableToEnemies = true; ((GrabbableObject)mowerBehaviour).itemProperties = MowerItem; ScreenItem = planBundle.LoadAsset<Item>("Assets/Screen/screen.asset"); ScreenBehaviour screenBehaviour = ScreenItem.spawnPrefab.AddComponent<ScreenBehaviour>(); ((GrabbableObject)screenBehaviour).grabbable = true; ((GrabbableObject)screenBehaviour).grabbableToEnemies = true; ((GrabbableObject)screenBehaviour).itemProperties = ScreenItem; ScreenOffMat = planBundle.LoadAsset<Material>("Assets/Screen/ScreenOff.mat"); ScreenOnMat = planBundle.LoadAsset<Material>("Assets/Screen/ScreenRenderMat.mat"); TranstitionClip = planBundle.LoadAsset<VideoClip>("Assets/Screen/transition.mp4"); for (int i = 0; i < 25; i++) { string text = "Assets/Screen/Clips/cg" + (i + 1) + ".mp4"; VideoClip item = heavyBundle.LoadAsset<VideoClip>(text); ScreenClips.Add(item); } RouterItem = planBundle.LoadAsset<Item>("Assets/Router/router.asset"); RouterBehaviour routerBehaviour = RouterItem.spawnPrefab.AddComponent<RouterBehaviour>(); ((GrabbableObject)routerBehaviour).grabbable = true; ((GrabbableObject)routerBehaviour).grabbableToEnemies = true; ((GrabbableObject)routerBehaviour).itemProperties = RouterItem; OysterItem = planBundle.LoadAsset<Item>("Assets/PlanTarot/Oyster/themool.asset"); OysterBehaviour oysterBehaviour = OysterItem.spawnPrefab.AddComponent<OysterBehaviour>(); ((GrabbableObject)oysterBehaviour).grabbable = true; ((GrabbableObject)oysterBehaviour).grabbableToEnemies = true; ((GrabbableObject)oysterBehaviour).itemProperties = OysterItem; RavcamItem = planBundle.LoadAsset<Item>("Assets/Ravcam/ravixcam.asset"); RavcamBehaviour ravcamBehaviour = RavcamItem.spawnPrefab.AddComponent<RavcamBehaviour>(); ((GrabbableObject)ravcamBehaviour).grabbable = true; ((GrabbableObject)ravcamBehaviour).grabbableToEnemies = true; ((GrabbableObject)ravcamBehaviour).itemProperties = RavcamItem; for (int j = 0; j < 3; j++) { SpringClips.Add(planBundle.LoadAsset<AudioClip>("Assets/Ravcam/sp" + j + ".mp3")); } TelephoneItem = planBundle.LoadAsset<Item>("Assets/Telephone/telephone.asset"); TelephoneBehaviour telephoneBehaviour = TelephoneItem.spawnPrefab.AddComponent<TelephoneBehaviour>(); ((GrabbableObject)telephoneBehaviour).grabbable = true; ((GrabbableObject)telephoneBehaviour).grabbableToEnemies = true; ((GrabbableObject)telephoneBehaviour).itemProperties = TelephoneItem; RingtoneClip = planBundle.LoadAsset<AudioClip>("Assets/Telephone/Clips/ling.mp3"); for (int k = 0; k < 5; k++) { TelClips.Add(planBundle.LoadAsset<VideoClip>("Assets/Telephone/Clips/v" + k + ".mp4")); } TelMat = planBundle.LoadAsset<Material>("Assets/Telephone/TelScreenMat.mat"); CallingMat = planBundle.LoadAsset<Material>("Assets/Telephone/calling.mat"); LieDetectorItem = planBundle.LoadAsset<Item>("Assets/Lie/liedetec.asset"); LieDetectorBehaviour lieDetectorBehaviour = LieDetectorItem.spawnPrefab.AddComponent<LieDetectorBehaviour>(); ((GrabbableObject)lieDetectorBehaviour).grabbable = true; ((GrabbableObject)lieDetectorBehaviour).grabbableToEnemies = true; ((GrabbableObject)lieDetectorBehaviour).itemProperties = LieDetectorItem; RightClip = planBundle.LoadAsset<AudioClip>("Assets/Lie/correct.ogg"); WrongClip = planBundle.LoadAsset<AudioClip>("Assets/Lie/wrong.ogg"); WrongMat = planBundle.LoadAsset<Material>("Assets/Lie/wrong.mat"); RightMat = planBundle.LoadAsset<Material>("Assets/Lie/right.mat"); VacuumItem = planBundle.LoadAsset<Item>("Assets/Aspi/aspi.asset"); AspiBehaviour aspiBehaviour = VacuumItem.spawnPrefab.AddComponent<AspiBehaviour>(); ((GrabbableObject)aspiBehaviour).grabbable = true; ((GrabbableObject)aspiBehaviour).grabbableToEnemies = true; ((GrabbableObject)aspiBehaviour).itemProperties = VacuumItem; CheeseItem = planBundle.LoadAsset<Item>("Assets/Cheese/cheese_item.asset"); CheeseBehaviour cheeseBehaviour = CheeseItem.spawnPrefab.AddComponent<CheeseBehaviour>(); ((GrabbableObject)cheeseBehaviour).grabbable = true; ((GrabbableObject)cheeseBehaviour).grabbableToEnemies = true; ((GrabbableObject)cheeseBehaviour).itemProperties = CheeseItem; KkItem = planBundle.LoadAsset<Item>("Assets/Cheese/kk_item.asset"); KkBehaviour kkBehaviour = KkItem.spawnPrefab.AddComponent<KkBehaviour>(); ((GrabbableObject)kkBehaviour).grabbable = true; ((GrabbableObject)kkBehaviour).grabbableToEnemies = true; ((GrabbableObject)kkBehaviour).itemProperties = KkItem; SplatClip = planBundle.LoadAsset<AudioClip>("Assets/Cheese/splat.ogg"); ChopstickItem = planBundle.LoadAsset<Item>("Assets/ChopSticks/chopsticks.asset"); ChopstickBehaviour chopstickBehaviour = ChopstickItem.spawnPrefab.AddComponent<ChopstickBehaviour>(); ((GrabbableObject)chopstickBehaviour).grabbable = true; ((GrabbableObject)chopstickBehaviour).grabbableToEnemies = true; ((GrabbableObject)chopstickBehaviour).itemProperties = ChopstickItem; FluteItem = planBundle.LoadAsset<Item>("Assets/Flute/flute_item.asset"); FluteBehaviour fluteBehaviour = FluteItem.spawnPrefab.AddComponent<FluteBehaviour>(); ((GrabbableObject)fluteBehaviour).grabbable = true; ((GrabbableObject)fluteBehaviour).grabbableToEnemies = true; ((GrabbableObject)fluteBehaviour).itemProperties = FluteItem; FluteClip = planBundle.LoadAsset<AudioClip>("Assets/Flute/dj.ogg"); BacteriaClip = planBundle.LoadAsset<AudioClip>("Assets/Flute/bacteria.mp3"); BolItem = planBundle.LoadAsset<Item>("Assets/Ravix/Bol/bol.asset"); BolBehaviour bolBehaviour = BolItem.spawnPrefab.AddComponent<BolBehaviour>(); ((GrabbableObject)bolBehaviour).grabbable = true; ((GrabbableObject)bolBehaviour).grabbableToEnemies = true; ((GrabbableObject)bolBehaviour).itemProperties = BolItem; BoosterItem = planBundle.LoadAsset<Item>("Assets/Ravix/Booster/Booster.asset"); BoosterBehaviour boosterBehaviour = BoosterItem.spawnPrefab.AddComponent<BoosterBehaviour>(); ((GrabbableObject)boosterBehaviour).grabbable = true; ((GrabbableObject)boosterBehaviour).grabbableToEnemies = true; ((GrabbableObject)boosterBehaviour).itemProperties = BoosterItem; JetpackBroken = planBundle.LoadAsset<AudioClip>("Assets/Ravix/Booster/JetpackBroken.wav"); JetPackThrustStart = planBundle.LoadAsset<AudioClip>("Assets/Ravix/Booster/JetPackThrustStart.wav"); AtiItem = planBundle.LoadAsset<Item>("Assets/Ravix/ATI/ati.asset"); AtiBehaviour atiBehaviour = AtiItem.spawnPrefab.AddComponent<AtiBehaviour>(); ((GrabbableObject)atiBehaviour).grabbable = true; ((GrabbableObject)atiBehaviour).grabbableToEnemies = true; ((GrabbableObject)atiBehaviour).itemProperties = AtiItem; ChapeauItem = planBundle.LoadAsset<Item>("Assets/Chapeau/ChapeauPointu.asset"); ChapeauBehaviour chapeauBehaviour = ChapeauItem.spawnPrefab.AddComponent<ChapeauBehaviour>(); ((GrabbableObject)chapeauBehaviour).grabbable = true; ((GrabbableObject)chapeauBehaviour).grabbableToEnemies = true; ((GrabbableObject)chapeauBehaviour).itemProperties = ChapeauItem; LetsGoOnmyouji = heavyBundle.LoadAsset<AudioClip>("Assets/Chapeau/Let's go, onmyouji.mp3"); HatComponent = planBundle.LoadAsset<GameObject>("Assets/Chapeau/Chapeau.prefab"); BourseItem = planBundle.LoadAsset<Item>("Assets/Bourse/Bourse.asset"); BourseBehaviour bourseBehaviour = BourseItem.spawnPrefab.AddComponent<BourseBehaviour>(); ((GrabbableObject)bourseBehaviour).grabbable = true; ((GrabbableObject)bourseBehaviour).grabbableToEnemies = true; ((GrabbableObject)bourseBehaviour).itemProperties = BourseItem; VacuumStartClip = planBundle.LoadAsset<AudioClip>("Assets/Aspi/vac_start.ogg"); VacuumLoopClip = planBundle.LoadAsset<AudioClip>("Assets/Aspi/vac_loop.ogg"); VacuumEndClip = planBundle.LoadAsset<AudioClip>("Assets/Aspi/vac_end.ogg"); TarotAssassin = planBundle.LoadAsset<Item>("Assets/PlanTarot/TarotAssassin.asset"); TarotAssassinBehaviour tarotAssassinBehaviour = TarotAssassin.spawnPrefab.AddComponent<TarotAssassinBehaviour>(); ((GrabbableObject)tarotAssassinBehaviour).grabbable = true; ((GrabbableObject)tarotAssassinBehaviour).grabbableToEnemies = true; ((GrabbableObject)tarotAssassinBehaviour).itemProperties = TarotAssassin; TarotAssassinBack = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/TarotAssassinBack.mat"); JsuiouMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/JsuiouMat.mat"); NWordMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/nwordMat.mat"); TheMoolMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/themoolMat.mat"); SpectrumMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Spectrum/SpecMat.mat"); RotateMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/360Mat.mat"); PlusTardMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/PlustardMat.mat"); PlusTardClip = planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/plustard.mp3"); DiscoMat = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/DiscoMat.mat"); CookingCard = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/CookingCard.mat"); FlashCard = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/FlashCard.mat"); MelodieCard = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/MelodieCard.mat"); for (int l = 1; l < 42; l++) { AudioClip item2 = heavyBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/soundboards/s" + l + ".ogg"); Soundboards.Add(item2); } ModBase.Instance.logger.LogDebug((object)(Soundboards.Count + " audioclips loaded for soundboard")); ModBase.Instance.logger.LogDebug((object)(Soundboards.Count((AudioClip clip) => (Object)(object)clip == (Object)null) + " audioclips are null")); PlanAssassinCard = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/PlanAssassinCard.mat"); WoofCard = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/WoofCard.mat"); BarkClip = planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/bark.ogg"); FartClip = planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/fart.ogg"); Soundboards.Add(BarkClip); Soundboards.Add(FartClip); RotateClips.Add(planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/aso36.ogg")); RotateClips.Add(planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/tomo36.ogg")); OrangeBurn = planBundle.LoadAsset<Material>("Assets/PlanTarot/Mats/OrangeBurn.mat"); JeSuisOuClip = planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/jsuiou.ogg"); TheMoolClip = planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Audio/themool.ogg"); for (int num = 0; num < 6; num++) { SpectrumMusics.Add(planBundle.LoadAsset<AudioClip>("Assets/PlanTarot/Spectrum/s" + (num + 1) + ".mp3")); } EatClip = planBundle.LoadAsset<AudioClip>("Assets/nomnom.ogg"); Comsau = planBundle.LoadAsset<AudioClip>("Assets/comsau.mp3"); GordionClip = planBundle.LoadAsset<VideoClip>("Assets/scout.mp4"); OtherClip = planBundle.LoadAsset<VideoClip>("Assets/roblox.mp4"); Valo1 = planBundle.LoadAsset<VideoClip>("Assets/val1.mp4"); Valo2 = planBundle.LoadAsset<VideoClip>("Assets/val2.mp4"); Planet = planBundle.LoadAsset<VideoClip>("Assets/plan1.mp4"); TintinClip = planBundle.LoadAsset<VideoClip>("Assets/dupon.mp4"); TintinAudio = planBundle.LoadAsset<AudioClip>("Assets/tintin.mp3"); LowFan = planBundle.LoadAsset<AudioClip>("Assets/PC/fan_low.ogg"); HighFan = planBundle.LoadAsset<AudioClip>("Assets/PC/fan_high.ogg"); HandBehaviour.RiseSfx = planBundle.LoadAsset<AudioClip>("Assets/Hand/rise.ogg"); HandBehaviour.FunnySfx = planBundle.LoadAsset<AudioClip>("Assets/Hand/funny.ogg"); HandBehaviour.DownSfx = planBundle.LoadAsset<AudioClip>("Assets/Hand/down.ogg"); for (int num2 = 0; num2 < 7; num2++) { string text2 = "Assets/Micro/p" + (num2 + 1) + ".ogg"; AudioClip item3 = planBundle.LoadAsset<AudioClip>(text2); KaquiteClips.Add(item3); } MowStartClip = planBundle.LoadAsset<AudioClip>("Assets/mower/mow_start.ogg"); MowLoopClip = planBundle.LoadAsset<AudioClip>("Assets/mower/mow_loop.ogg"); MowEndClip = planBundle.LoadAsset<AudioClip>("Assets/mower/mow_stop.ogg"); for (int num3 = 0; num3 < 5; num3++) { string text3 = "Assets/Clavier/cl" + (num3 + 1) + ".ogg"; AudioClip item4 = planBundle.LoadAsset<AudioClip>(text3); KeyboardClips.Add(item4); } for (int num4 = 0; num4 < 3; num4++) { string text4 = "Assets/Cheese/s" + (num4 + 1) + ".ogg"; AudioClip item5 = planBundle.LoadAsset<AudioClip>(text4); StomachacheClips.Add(item5); } FartClips.Add(planBundle.LoadAsset<AudioClip>("Assets/Cheese/F1.mp3")); FartClips.Add(planBundle.LoadAsset<AudioClip>("Assets/Cheese/F1.mp3")); NClips.Add(planBundle.LoadAsset<VideoClip>("Assets/PlanTarot/Jumpscare/nga.mp4")); NClips.Add(planBundle.LoadAsset<VideoClip>("Assets/PlanTarot/Jumpscare/nword.mp4")); NClips.Add(planBundle.LoadAsset<VideoClip>("Assets/PlanTarot/Jumpscare/nword1.mp4")); NClips.Add(planBundle.LoadAsset<VideoClip>("Assets/PlanTarot/Jumpscare/nword2.mp4")); JumpscareCanvas = planBundle.LoadAsset<GameObject>("Assets/PlanTarot/Jumpscare/JumpscareCanvas.prefab"); JumpscareCanvas.AddComponent<Jumpscare>(); for (int num5 = 0; num5 < 6; num5++) { ScreamClips.Add(planBundle.LoadAsset<AudioClip>("Assets/Scream/s" + (num5 + 1) + ".ogg")); } LeFauxClip = planBundle.LoadAsset<AudioClip>("Assets/faux.ogg"); } private static void InitScraps() { PlanRarity = new SpawnRarity(40, PlanAssassin); PlanRarity.SetValues(-1, -1, 15, 35, 20, -1, -1, -1, 60, 50, 25); SausageTicketRarity = new SpawnRarity(10, 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, 30, 33, 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); TarotAssassinRarity = new SpawnRarity(20, TarotAssassin); TarotAssassinRarity.CopyRaritiesFrom(PCRarity); ChapeauSpawnRarity = new SpawnRarity(25, ChapeauItem); ChapeauSpawnRarity.SetValues(20, -1, 30, 30, -1, 30, -1, 30, 35, 40); BourseSpawnRarity = new SpawnRarity(10, BourseItem); BourseSpawnRarity.CopyRaritiesFrom(CheeseRarity); } private static void LoadTarotCards() { TarotAssassinCards.Add(typeof(JsuisouCard), 5); TarotAssassinCards.Add(typeof(NWordCard), 4); TarotAssassinCards.Add(typeof(SpectrumCard), 4); TarotAssassinCards.Add(typeof(RotateCard), 4); TarotAssassinCards.Add(typeof(PlusTardCard), 4); TarotAssassinCards.Add(typeof(DiscoCard), 3); TarotAssassinCards.Add(typeof(PlanAssassinCard), 7); TarotAssassinCards.Add(typeof(FlashCard), 5); TarotAssassinCards.Add(typeof(WoofCard), 4); TarotAssassinCards.Add(typeof(TheMoolCard), 6); TarotAssassinCards.Add(typeof(MelodieCard), 5); } } [HarmonyPatch(typeof(GameNetworkManager))] internal class NetworkPatcher { [HarmonyPatch("Start")] [HarmonyPostfix] private static void RegisterItems() { NetworkManager component = ((Component)GameNetworkManager.Instance).GetComponent<NetworkManager>(); 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); component.AddNetworkPrefab(Assets.TarotAssassin.spawnPrefab); component.AddNetworkPrefab(Assets.ChapeauItem.spawnPrefab); component.AddNetworkPrefab(Assets.BourseItem.spawnPrefab); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void InstantiateJump() { Assets.JumpscareObj = Object.Instantiate<GameObject>(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<UnlockableItem> enumerator = __instance.unlockablesList.unlockables.Where((UnlockableItem unlockable) => unlockable.unlockableName == "Disco Ball").GetEnumerator()) { if (enumerator.MoveNext()) { UnlockableItem current = enumerator.Current; Assets.DiscoBall = Object.Instantiate<GameObject>(current.prefabObject, (Transform)null, true); Assets.DiscoBall.transform.position = new Vector3(0f, -1000f, 0f); ((Behaviour)Assets.DiscoBall.GetComponent<AutoParentToShip>()).enabled = false; ((Behaviour)Assets.DiscoBall.GetComponentInChildren<CozyLights>()).enabled = false; ((Behaviour)Assets.DiscoBall.GetComponentInChildren<Animator>()).enabled = false; ((Component)Assets.DiscoBall.transform.GetChild(1)).gameObject.SetActive(false); Transform child = Assets.DiscoBall.transform.GetChild(0); Transform child2 = child.GetChild(0); ((Renderer)((Component)child2).gameObject.GetComponent<MeshRenderer>()).enabled = false; Transform child3 = child2.GetChild(0); Transform child4 = child2.GetChild(1); ((Behaviour)((Component)child3).gameObject.GetComponent<Light>()).enabled = false; ((Behaviour)((Component)child4).gameObject.GetComponent<Light>()).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.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); Assets.TarotAssassinRarity.ApplySpawnRarity(val); Assets.ChapeauSpawnRarity.ApplySpawnRarity(val); Assets.BourseSpawnRarity.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); RegisterItem(Assets.TarotAssassin, __instance); RegisterItem(Assets.ChapeauItem, __instance); RegisterItem(Assets.BourseItem, __instance); } private static void RegisterItem(Item item, StartOfRound manager) { if (!manager.allItemsList.itemsList.Contains(item)) { manager.allItemsList.itemsList.Add(item); } } } } 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<VideoPlayer>(); player.SetTargetAudioSource((ushort)0, ((Component)this).gameObject.GetComponent<AudioSource>()); } 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 { public static class Miscs { public static bool CheckPlayer(PlayerControllerB player) { return (Object)(object)player != (Object)null && !player.isPlayerDead && player.isPlayerControlled; } public static Transform GetParentTransformForItem(PlayerControllerB player) { if (((Object)(object)player != (Object)null && player.isInElevator) || StartOfRound.Instance.inShipPhase) { return StartOfRound.Instance.elevatorTransform; } return RoundManager.Instance.spawnedScrapContainer; } public static Transform GetParentTransformForItem(GrabbableObject reference) { if ((Object)(object)reference.playerHeldBy != (Object)null) { return GetParentTransformForItem(reference.playerHeldBy); } return ((Object)(object)((Component)reference).transform.parent == (Object)(object)StartOfRound.Instance.elevatorTransform) ? StartOfRound.Instance.elevatorTransform : RoundManager.Instance.spawnedScrapContainer; } public static PlayerControllerB GetRandomPlayer() { return StartOfRound.Instance.allPlayerScripts[Random.Range(0, StartOfRound.Instance.allPlayerScripts.Length)]; } [CanBeNull] public static Transform GetRandomAINodeAroundPlayer(PlayerControllerB player, float maxRange) { GameObject[] source = (player.isInsideFactory ? Helper.GetAllInsideAINodes() : Helper.GetAllOutsideAINodes()); GameObject[] array = source.Where((GameObject node) => Vector3.Distance(node.transform.position, ((Component)player).transform.position) <= maxRange).ToArray(); if (array.Length == 0) { return null; } return array[Random.Range(0, array.Length)].transform; } } [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<SpectrumComponent>(); if ((Object)(object)component == (Object)null) { ((Component)val3).gameObject.AddComponent<SpectrumComponent>(); component = ((Component)val3).GetComponent<SpectrumComponent>(); } 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<RotateComponent>(); if ((Object)(object)rotateComponent == (Object)null) { rotateComponent = ((Component)val3).gameObject.AddComponent<RotateComponent>(); } ((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<RotateComponent>(); if ((Object)(object)component == (Object)null) { ((Component)val3).gameObject.AddComponent<RotateComponent>(); component = ((Component)val3).GetComponent<RotateComponent>(); } ((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<GameObject>(Assets.KkItem.spawnPrefab, val3, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val4.GetComponent<GrabbableObject>().fallTime = 0f; val4.GetComponent<NetworkObject>().Spawn(false); val4.GetComponent<GrabbableObject>().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; TarotDeckBaseBehaviour val3 = ((IEnumerable<TarotDeckBaseBehaviour>)Object.FindObjectsOfType<TarotDeckBaseBehaviour>()).FirstOrDefault((Func<TarotDeckBaseBehaviour, bool>)((TarotDeckBaseBehaviour tarotBehaviour) => (Object)(object)tarotBehaviour != (Object)null && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject) && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject.GetComponent<NetworkObject>()) && ((Component)tarotBehaviour).gameObject.GetComponent<NetworkObject>().NetworkObjectId == cardId2)); if (!((Object)(object)val3 == (Object)null)) { AudioSource component = ((Component)val3).GetComponent<AudioSource>(); 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; TarotDeckBaseBehaviour val3 = ((IEnumerable<TarotDeckBaseBehaviour>)Object.FindObjectsOfType<TarotDeckBaseBehaviour>()).FirstOrDefault((Func<TarotDeckBaseBehaviour, bool>)((TarotDeckBaseBehaviour tarotBehaviour) => (Object)(object)tarotBehaviour != (Object)null && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject) && Object.op_Implicit((Object)(object)((Component)tarotBehaviour).gameObject.GetComponent<NetworkObject>()) && ((Component)tarotBehaviour).gameObject.GetComponent<NetworkObject>().NetworkObjectId == cardId2)); if (!((Object)(object)val3 == (Object)null)) { AudioSource component = ((Component)val3).GetComponent<AudioSource>(); 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<DiscoComponent>(); if ((Object)(object)discoComponent == (Object)null) { discoComponent = ((Component)val3).gameObject.AddComponent<DiscoComponent>(); } ((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)); } } } [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) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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(2062733587u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2062733587u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (val3.playerClientId == playerID && ((NetworkBehaviour)val3).IsOwner) { val3.KillPlayer(Vector3.zero, true, (CauseOfDeath)12, 0, default(Vector3), false); } } } [ClientRpc] public void FinishItemSpawningClientRpc(NetworkObjectReference netRef, int scrapValue, Vector3 startPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) 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(1602885741u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref netRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, scrapValue); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1602885741u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(waitForItemToSpawnOnClient(netRef, scrapValue, startPos)); } } } private static IEnumerator waitForItemToSpawnOnClient(NetworkObjectReference netRef, int scrapValue, Vector3 startPos) { //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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) NetworkObject networkObject = null; float startTime = Time.realtimeSinceStartup; while (Time.realtimeSinceStartup - startTime < 8f && !((NetworkObjectReference)(ref netRef)).TryGet(ref networkObject, (NetworkManager)null)) { yield return (object)new WaitForSeconds(0.1f); } if (!((Object)(object)networkObject == (Object)null)) { yield return (object)new WaitForEndOfFrame(); GrabbableObject obj = ((Component)networkObject).GetComponent<GrabbableObject>(); obj.SetScrapValue(scrapValue); obj.targetFloorPosition = obj.GetItemFloorPosition(startPos); obj.startFallingPosition = startPos; obj.fallTime = 0f; obj.hasHitGround = false; obj.reachedFloorTarget = false; } } [ClientRpc] public void BarkClientRpc(int playerClientId) { //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(189992812u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerClientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 189992812u, 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[playerClientId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { BarkFartComponent component = ((Component)val3).GetComponent<BarkFartComponent>(); if ((Object)(object)component != (Object)null) { component.Enable(); return; } ((Component)val3).gameObject.AddComponent<BarkFartComponent>(); ((Component)val3).GetComponent<BarkFartComponent>(); } } [ServerRpc] public void BarkFartServerRpc(bool bark, 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_012f: 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_00d2: 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_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)base.__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(4192664856u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref bark, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4192664856u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BarkFartClientRpc(bark, playerId); } } [ClientRpc] public void BarkFartClientRpc(bool bark, 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) 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(1116605988u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref bark, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1116605988u, 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]; val3.movementAudio.PlayOneShot(bark ? Assets.BarkClip : Assets.FartClip, Random.Range(0.75f, 1.25f)); } } } [ServerRpc] public void QueueSoundboardServerRpc(int soundboard, 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: 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_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_00b7: 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_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)base.__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(766173534u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, soundboard); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 766173534u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; QueueSoundboardClientRpc(soundboard, pos); } } [ClientRpc] public void QueueSoundboardClientRpc(int soundboard, 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_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_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) //IL_0102: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2362245939u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, soundboard); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2362245939u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; SoundboardOnMapComponent[] array = Object.FindObjectsOfType<SoundboardOnMapComponent>(); foreach (SoundboardOnMapComponent soundboardOnMapComponent in array) { if (((Behaviour)soundboardOnMapComponent).enabled) { soundboardOnMapComponent.QueueSoundboardOnClient(soundboard, pos); } } } [ClientRpc] public void AddSoundboardClientRpc() { //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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown 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(521586055u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 521586055u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Object.FindObjectsOfType<SoundboardOnMapComponent>().Any((SoundboardOnMapComponent mapComponent) => ((Behaviour)mapComponent).enabled)) { GameObject val3 = new GameObject("Soundboard Component Container"); val3.AddComponent<SoundboardOnMapComponent>(); } } } private static IEnumerator StartMusicCoroutine(MusicPlayComponent component) { float startTime = Time.realtimeSinceStartup; while (Time.realtimeSinceStartup - startTime < 5f && !component.IsAudioClipReady()) { yield return (object)new WaitForSeconds(0.5f); } if (component.IsAudioClipReady()) { yield return (object)new WaitForFixedUpdate(); component.BeginPlay(); } } 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<Jumpscare>()?.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<GameObject>(_networkPrefab, Vector3.zero, Quaternion.identity).GetComponent<NetworkObject>().Spawn(false); } } [HarmonyPatch(typeof(GameNetworkManager), "Start")] [HarmonyPostfix] private static void Init() { if (!((Object)(object)_networkPrefab != (Object)null)) { _networkPrefab = Assets.planBundle.LoadAsset<GameObject>("Assets/PlanNetwork.prefab"); _networkPrefab.AddComponent<Networker>(); NetworkManager.Singleton.AddNetworkPrefab(_netw