Decompiled source of LCSoundRandomizerMod v1.1.0
LCSoundRandomizerMod.dll
Decompiled 2 months 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LCSoundRandomizerMod.ApplyPatches; using LCSoundRandomizerMod.Netcode; using LCSoundRandomizerMod.NetcodePatcher; using Microsoft.CodeAnalysis; using STSharedAudioLib; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("LCSoundRandomizerMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Randomize the sounds and songs of tons of items and enemies!")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0")] [assembly: AssemblyProduct("LCSoundRandomizerMod")] [assembly: AssemblyTitle("LCSoundRandomizerMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace LCSoundRandomizerMod { public class Config { public static ConfigEntry<bool> Multiplayer; public static ConfigEntry<bool> CompletelyRandom; public static ConfigEntry<bool> Footsteps; public Config(ConfigFile cfg) { Multiplayer = cfg.Bind<bool>("Multiplayer", "Synchronize Sounds", true, "If true, will play the same random sounds for everyone. If false, everyone will get different random sounds.\nATTENTION!! If true, everyone in the lobby needs this mod and this option set to true!"); CompletelyRandom = cfg.Bind<bool>("Customization", "Completely Randomize Sounds", false, "If true, non-footstep sounds will be chosen completely randomly. If false, sounds will be randomly picked to fit the object playing the sound.\nFor example, looping audio like that of the Toy Robot could play very short sound effects on repeat. Setting this to false will more often play longer sounds that are less repetitive on loop.\nIf config Multiplayer's [Synchronize Sounds] is true, lobby host's values are used."); Footsteps = cfg.Bind<bool>("Customization", "Randomize Enemy Footsteps", true, "If true, enemies' footstep sounds will get randomized to other random footsteps. If false, enemies play their original footstep sounds.\nIf config Multiplayer's [Synchronize Sounds] is true, lobby host's values are used."); } public static void DisplayConfigs() { if (CompletelyRandom.Value) { Plugin.Logger.LogInfo((object)"Config [Completely Randomize Sounds] is set to TRUE. Sounds will be picked entirely randomly, regardless of size or repetition."); } else { Plugin.Logger.LogInfo((object)"Config [Completely Randomize Sounds] is set to FALSE. Sounds will be randomized to more often fit the audio-length of the object playing the sound."); } if (Footsteps.Value) { Plugin.Logger.LogInfo((object)"Config [Randomize Enemy Footsteps] is set to TRUE. Enemies' footstep sounds will be randomized."); } else { Plugin.Logger.LogInfo((object)"Config [Randomize Enemy Footsteps] is set to FALSE. Enemies will play their original footstep sounds."); } if (Multiplayer.Value) { Plugin.Logger.LogInfo((object)"Config [Synchronize Sounds] is set to TRUE. Randomized sounds will be synced across players, all of which need this config option set to true!"); } else { Plugin.Logger.LogInfo((object)"Config [Synchronize Sounds] is set to FALSE. Randomized sounds will be local, and other players in the lobby do not need this mod."); } } } public class Delayer : MonoBehaviour { public static Delayer instance; private void Awake() { instance = this; Plugin.Logger.LogDebug((object)("instantiated Delayer on " + ((Object)((Component)instance).gameObject).name)); } public void DelayHoardingBugCheck(HoarderBugAI __instance) { ((MonoBehaviour)this).StartCoroutine(CheckHoardingBugReplacement(__instance)); } private static IEnumerator CheckHoardingBugReplacement(HoarderBugAI __instance) { Plugin.Logger.LogDebug((object)"started CheckHoardingBugReplacement Coroutine"); yield return (object)new WaitForEndOfFrame(); HoarderBugAIPatch.NewHoarderBugAI.CheckReplacement(__instance); } public void DelayJesterCheck(JesterAI __instance) { ((MonoBehaviour)this).StartCoroutine(CheckJesterReplacement(__instance)); } private static IEnumerator CheckJesterReplacement(JesterAI __instance) { Plugin.Logger.LogDebug((object)"started CheckJesterReplacement Coroutine"); yield return (object)new WaitForEndOfFrame(); JesterAIPatch.NewJesterAI.CheckReplacement(__instance); } public void DelayJesterReroll(JesterAI __instance) { ((MonoBehaviour)this).StartCoroutine(RerollJester(__instance)); } private static IEnumerator RerollJester(JesterAI __instance) { Plugin.Logger.LogDebug((object)"started RerollJester Coroutine"); yield return (object)new WaitForSeconds(1f); JesterAIPatch.NewJesterAI.RerollJesterSFX(__instance); } public void DelayNutcrackerMusicCheck(NutcrackerEnemyAI __instance) { ((MonoBehaviour)this).StartCoroutine(CheckNutcrackerMusicReplacement(__instance)); } private static IEnumerator CheckNutcrackerMusicReplacement(NutcrackerEnemyAI __instance) { Plugin.Logger.LogDebug((object)"started CheckNutcrackerMusicReplacement Coroutine"); yield return (object)new WaitForEndOfFrame(); NutcrackerEnemyAIPatch.NewNutcrackerEnemyAI.CheckReplacement(__instance); } public void DelayNutcrackerMusicReroll(NutcrackerEnemyAI __instance) { ((MonoBehaviour)this).StartCoroutine(RerollNutcrackerMusic(__instance)); } private static IEnumerator RerollNutcrackerMusic(NutcrackerEnemyAI __instance) { Plugin.Logger.LogDebug((object)"started RerollNutcrackerMusic Coroutine"); yield return (object)new WaitForSeconds(1f); NutcrackerEnemyAIPatch.NewNutcrackerEnemyAI.RerollMusic(__instance); } } [BepInPlugin("LCSoundRandomizerMod", "LCSoundRandomizerMod", "1.1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Logger; public static AssetBundle SoundRandomizerAssetBundle; public static GameObject SoundRandomizerGameObject; public static SharedAudioComponent SoundRandomizerAudioComponent; public static AudioList SoundRandomizerAudioList; public static SharedAudioComponent PlaylistsAudioComponent; public static AudioList ShortAudioList; public static AudioList MediumAudioList; public static AudioList LongAudioList; public static SharedAudioComponent FootstepsAudioComponent; public static List<AudioList> FootstepsAllAudioLists; public static SharedAudioComponent CollectionsAudioComponent; public static List<AudioList> CollectionsAllAudioLists; public static Config MyConfig { get; internal set; } private void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Logger.LogInfo((object)"Plugin LCSoundRandomizerMod is loaded!"); Harmony val = new Harmony("LCSoundRandomizerMod"); val.PatchAll(); MyConfig = new Config(((BaseUnityPlugin)this).Config); SoundRandomizerAudioList = ScriptableObject.CreateInstance<AudioList>(); ((Object)SoundRandomizerAudioList).name = "AllAudioClips"; ShortAudioList = ScriptableObject.CreateInstance<AudioList>(); ((Object)ShortAudioList).name = "Playlist.Short"; MediumAudioList = ScriptableObject.CreateInstance<AudioList>(); ((Object)MediumAudioList).name = "Playlist.Medium"; LongAudioList = ScriptableObject.CreateInstance<AudioList>(); ((Object)LongAudioList).name = "Playlist.Long"; Config.DisplayConfigs(); if (Config.Multiplayer.Value) { NetcodePatcher(); LoadAssetBundle(); } } public static void SetUp() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown SoundRandomizerGameObject = new GameObject("LCSoundRandomizerMod"); SoundRandomizerGameObject.transform.SetParent(SearchForSimonTendoManagers().transform, false); SoundRandomizerGameObject.AddComponent<Delayer>(); SoundRandomizerAudioComponent = SoundRandomizerGameObject.AddComponent<SharedAudioComponent>(); SoundRandomizerAudioComponent.allAudioLists.Add(SoundRandomizerAudioList); PlaylistsAudioComponent = SoundRandomizerGameObject.AddComponent<SharedAudioComponent>(); PlaylistsAudioComponent.allAudioLists.Add(ShortAudioList); PlaylistsAudioComponent.allAudioLists.Add(MediumAudioList); PlaylistsAudioComponent.allAudioLists.Add(LongAudioList); FootstepsAudioComponent = SoundRandomizerGameObject.AddComponent<SharedAudioComponent>(); if (FootstepsAllAudioLists != null) { FootstepsAudioComponent.allAudioLists = FootstepsAllAudioLists; Logger.LogDebug((object)$"loaded previous Footstep allAudioLists with length {FootstepsAudioComponent.allAudioLists.Count}"); } CollectionsAudioComponent = SoundRandomizerGameObject.AddComponent<SharedAudioComponent>(); if (CollectionsAllAudioLists != null) { CollectionsAudioComponent.allAudioLists = CollectionsAllAudioLists; Logger.LogDebug((object)$"loaded previous Collections allAudioLists with length {CollectionsAudioComponent.allAudioLists.Count}"); } } public static void ResetStaticOnStart() { RadMechAIPatch.radMechType.audioClips = RadMechAIPatch.allOriginalClips.ToArray(); RadMechAIPatch.NewRadMechAI.ResizeRadMechStaticClips(RadMechAIPatch.radMechType); EnemyAIPatch.doublewingType.audioClips = EnemyAIPatch.originalManticoilClips.ToArray(); EnemyAIPatch.docileLocustType.audioClips = EnemyAIPatch.originalLocustClips.ToArray(); FlowerSnakeEnemyPatch.flowerSnakeType.audioClips = FlowerSnakeEnemyPatch.originalFlowerSnakeClips.ToArray(); RedLocustBeesPatch.beeType.audioClips = RedLocustBeesPatch.originalCircuitBeesClips.ToArray(); MaskedPlayerEnemyPatch.maskedType.audioClips = MaskedPlayerEnemyPatch.originalMaskedClips.ToArray(); BaboonBirdAIPatch.baboonType.audioClips = BaboonBirdAIPatch.originalBaboonHawkClips.ToArray(); } private static GameObject SearchForSimonTendoManagers() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown Logger.LogDebug((object)"Starting search for SimonTendoManagers..."); GameObject[] array = Object.FindObjectsOfType<GameObject>(); GameObject[] array2 = array; GameObject result; foreach (GameObject val in array2) { if (((Object)val).name == "SimonTendoManagers") { result = val; Logger.LogDebug((object)("Found existing " + ((Object)val).name + ", using as parent.")); return result; } } result = new GameObject("SimonTendoManagers"); result.transform.SetParent(((Component)StartOfRound.Instance).gameObject.transform.parent, false); Logger.LogDebug((object)("Did not find existing SimonTendoManagers, instantiating new " + ((Object)result).name)); return result; } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } public static GameObject SearchForSimonTendoNetworkHandlers() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown Logger.LogDebug((object)"Starting search for SimonTendoNetworkHandlers"); bool flag = false; GameObject[] array = Object.FindObjectsOfType<GameObject>(); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name == "SimonTendoNetworkHandlers") { GameObject result = val; flag = true; Logger.LogDebug((object)("Found existing " + ((Object)val).name + ", using as parent.")); return result; } } if (!flag) { GameObject result = new GameObject("SimonTendoNetworkHandlers"); Logger.LogDebug((object)("Did not find existing NetworkHandlers, instantiating new " + ((Object)result).name)); return result; } Logger.LogError((object)"Reached end of SearchForSimonTendoNetworkHandlers without having returned object."); return null; } private static void LoadAssetBundle() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); SoundRandomizerAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "soundrandomizerassetbundle")); if ((Object)(object)SoundRandomizerAssetBundle == (Object)null) { Logger.LogError((object)"Failed to load SoundRandomizer AssetBundle"); } else { Logger.LogInfo((object)"Loaded SoundRandomizer AssetBundle"); } } public static AudioClip AddAudioClip(AudioClip clipToAdd, int weight, PreferredPlaylist preferredPlaylist) { SharedAudioMethods.AudioClipAddNew(clipToAdd, SoundRandomizerAudioList, true, weight, false); AudioList val = (AudioList)(preferredPlaylist switch { PreferredPlaylist.Short => ShortAudioList, PreferredPlaylist.Medium => MediumAudioList, PreferredPlaylist.Long => LongAudioList, _ => null, }); if ((Object)(object)val != (Object)null) { SharedAudioMethods.AudioClipAddNew(clipToAdd, val, false, weight, false); } return clipToAdd; } public static AudioClip[] AddAudioClipRange(AudioClip[] clipsToAdd, int amountToAdd, int weight, PreferredPlaylist preferredPlaylist) { if (amountToAdd >= clipsToAdd.Length) { amountToAdd = clipsToAdd.Length; } for (int i = 0; i < amountToAdd; i++) { AddAudioClip(clipsToAdd[i], weight, preferredPlaylist); } return clipsToAdd; } public static AudioList AddFootstepRange(AudioClip[] clipsToAdd, string listName, int listWeight = 100) { AudioList val = SharedAudioMethods.AudioListCreateNew(FootstepsAudioComponent, true, $"Footsteps.{listName} // {listWeight}", listWeight); SharedAudioMethods.AudioClipAddNewRange(clipsToAdd, val, true, 100, false); return val; } public static AudioList AddCollectionRange(AudioClip[] clipsToAdd, string listName, int listWeight = 100) { AudioList val = SharedAudioMethods.AudioListCreateNew(CollectionsAudioComponent, true, $"Collection.{listName} // {listWeight}", listWeight); SharedAudioMethods.AudioClipAddNewRange(clipsToAdd, val, true, 100, false); return val; } public static AudioClip PlayRandomClipLocal(GameObject instancedObject, string fieldName, PreferredPlaylist primaryPlaylist = PreferredPlaylist.None, PreferredPlaylist secondaryPlaylist = PreferredPlaylist.None) { AudioClip randomClip = GetRandomClip(primaryPlaylist, secondaryPlaylist); Logger.LogDebug((object)$"{((Object)instancedObject).name} - '{fieldName}' // now playing: {((Object)randomClip).name} at index [{SharedAudioMethods.AudioClipGetIndex(randomClip, SoundRandomizerAudioList, false)}]"); return randomClip; } public static int PlayRandomClipNetcode(PreferredPlaylist primaryPlaylist = PreferredPlaylist.None, PreferredPlaylist secondaryPlaylist = PreferredPlaylist.None) { return SharedAudioMethods.AudioClipGetIndex(GetRandomClip(primaryPlaylist, secondaryPlaylist), SoundRandomizerAudioList, false); } private static AudioClip GetRandomClip(PreferredPlaylist primaryPlaylist, PreferredPlaylist secondaryPlaylist) { if (Config.CompletelyRandom.Value) { return SharedAudioMethods.AudioClipGetRandom(SoundRandomizerAudioList, false); } if (primaryPlaylist == secondaryPlaylist && primaryPlaylist != PreferredPlaylist.None && secondaryPlaylist != PreferredPlaylist.None) { Logger.LogWarning((object)"primaryPlaylist equals secondaryPlaylist!! setting to medium and long"); primaryPlaylist = PreferredPlaylist.Medium; secondaryPlaylist = PreferredPlaylist.Long; } if (primaryPlaylist == PreferredPlaylist.None) { return SharedAudioMethods.AudioClipGetRandomByWeight(SoundRandomizerAudioList, false); } foreach (AudioList allAudioList in PlaylistsAudioComponent.allAudioLists) { allAudioList.listWeight = 0; } if (secondaryPlaylist == PreferredPlaylist.None) { PlaylistsAudioComponent.allAudioLists[(int)primaryPlaylist].listWeight = 80; } else { PlaylistsAudioComponent.allAudioLists[(int)primaryPlaylist].listWeight = 60; PlaylistsAudioComponent.allAudioLists[(int)secondaryPlaylist].listWeight = 30; } foreach (AudioList allAudioList2 in PlaylistsAudioComponent.allAudioLists) { if (allAudioList2.listWeight == 0) { allAudioList2.listWeight = 10; } } return SharedAudioMethods.AudioClipGetRandomByWeight(SharedAudioMethods.AudioListGetRandomByWeight(PlaylistsAudioComponent, false, true), false); } public static AudioClip[] PlayFootstepClipsLocal(GameObject instancedObject, string fieldName = "footstepSFX") { AudioList randomList = GetRandomList(FootstepsAudioComponent); AudioClip[] result = SharedAudioMethods.AudioClipGetAll(randomList, false); Logger.LogDebug((object)(((Object)instancedObject).name + " - '" + fieldName + "' // now playing: " + ((Object)randomList).name)); return result; } public static int PlayFootstepClipsNetcode() { return SharedAudioMethods.AudioListGetIndex(GetRandomList(FootstepsAudioComponent), FootstepsAudioComponent, false, true, true); } public static AudioClip[] PlayCollectionClipsLocal(GameObject instancedObject, string fieldName) { AudioList randomList = GetRandomList(CollectionsAudioComponent); AudioClip[] result = SharedAudioMethods.AudioClipGetAll(randomList, false); Logger.LogDebug((object)(((Object)instancedObject).name + " - '" + fieldName + "' // now playing: " + ((Object)randomList).name)); return result; } public static int PlayCollectionClipsNetcode() { return SharedAudioMethods.AudioListGetIndex(GetRandomList(CollectionsAudioComponent), CollectionsAudioComponent, false, true, true); } private static AudioList GetRandomList(SharedAudioComponent audioComponent) { if (Config.CompletelyRandom.Value) { return SharedAudioMethods.AudioListGetRandom(audioComponent, false, true); } return SharedAudioMethods.AudioListGetRandomByWeight(audioComponent, false, true); } } public enum PreferredPlaylist { None = -1, Short, Medium, Long } public static class PluginInfo { public const string PLUGIN_GUID = "LCSoundRandomizerMod"; public const string PLUGIN_NAME = "LCSoundRandomizerMod"; public const string PLUGIN_VERSION = "1.1.0"; } } namespace LCSoundRandomizerMod.Netcode { public class GameNetworkManagerPatch { [HarmonyPatch] public class NetworkObjectManager { private static GameObject networkPrefab; [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] public static void Init() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (Config.Multiplayer.Value && !((Object)(object)networkPrefab != (Object)null)) { networkPrefab = (GameObject)Plugin.SoundRandomizerAssetBundle.LoadAsset("Assets/SoundRandomizerNetworkHandler.prefab"); networkPrefab.AddComponent<SoundRandomizerNetworkHandler>(); NetworkManager.Singleton.AddNetworkPrefab(networkPrefab); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "Awake")] private static void SpawnNetworkHandler() { if (Config.Multiplayer.Value && (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer)) { GameObject val = Object.Instantiate<GameObject>(networkPrefab, Plugin.SearchForSimonTendoNetworkHandlers().transform, false); val.GetComponent<NetworkObject>().Spawn(false); } } } } public class PasswordContainer : MonoBehaviour { public string lastPassword; public string lastPasswordSecondary; private void Start() { Plugin.Logger.LogDebug((object)("attached PasswordContainer component to " + ((Object)((Component)this).gameObject).name)); } } public class PlayerControllerBPatch { [HarmonyPatch] public class NewPlayerControllerB { [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] public static void ConnectClientToPlayerObjectPostfix() { Plugin.ResetStaticOnStart(); if (Config.Multiplayer.Value) { SoundRandomizerNetworkHandler.instance.JoinSynchronizeSoundsServerRpc(); } } } } public class SoundRandomizerNetworkHandler : NetworkBehaviour { public static SoundRandomizerNetworkHandler instance; private void Awake() { instance = this; } [ClientRpc] public void SynchronizeAmbienceClipClientRpc(int indexToLookFor, float soundVolume) { //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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2984702317u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref soundVolume, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2984702317u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on PlaySoundAroundPlayersAsGroup() to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); SoundManager.Instance.PlaySoundAroundPlayersAsGroup(Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip, soundVolume); } } } [ClientRpc] public void SynchronizeAnimatedItemClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1376581582u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1376581582u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AnimatedItem component = ((Component)val3).GetComponent<AnimatedItem>(); if (!(password == "Grab")) { if (password == "Drop") { switch (((Object)component).name) { case "RubberDucky(Clone)": component.dropAudio = audioClip; break; case "Dentures(Clone)": component.dropAudio = audioClip; break; case "ToyTrain(Clone)": component.dropAudio = audioClip; break; } } else { Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } } else { component.grabAudio = audioClip; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } [ClientRpc] public void SynchronizeAnimatedObjectTriggerClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1524464199u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1524464199u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; switch (password) { case "DoorTrue": { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip[] boolTrueAudios = (AudioClip[])(object)new AudioClip[1] { audioClip }; DoorLockPatch.GetChildDoorAudio(((Component)val3).gameObject).boolTrueAudios = boolTrueAudios; break; } case "DoorFalse": { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip[] boolFalseAudios = (AudioClip[])(object)new AudioClip[1] { audioClip }; DoorLockPatch.GetChildDoorAudio(((Component)val3).gameObject).boolFalseAudios = boolFalseAudios; break; } case "DoorTrueFail": Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)val3).name + " with password " + password)); AnimatedObjectTriggerPatch.ResetDoorAudio(boolVal: false, DoorLockPatch.GetChildDoorAudio(((Component)val3).gameObject)); break; case "DoorFalseFail": Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)val3).name + " with password " + password)); AnimatedObjectTriggerPatch.ResetDoorAudio(boolVal: true, DoorLockPatch.GetChildDoorAudio(((Component)val3).gameObject)); break; case "Bell": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); ((Component)val3).GetComponent<AnimatedObjectTrigger>().boolFalseAudios[0] = audioClip; break; case "BellFail": Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)val3).name + " with password " + password)); ((Component)val3).GetComponent<AnimatedObjectTrigger>().boolFalseAudios[0] = AnimatedObjectTriggerPatch.originalBellDing; break; default: Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); break; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } [ClientRpc] public void SynchronizeBaboonBirdAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(74049520u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 74049520u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { if (password == "Footstep") { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); BaboonHawkAudioEvents component = ((Component)((Component)val3).transform.GetChild(0).GetChild(3)).GetComponent<BaboonHawkAudioEvents>(); component.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password, isCollection: true); BaboonBirdAI component2 = ((Component)val3).GetComponent<BaboonBirdAI>(); if (!(password == "Scream")) { if (password == "Laugh") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.CollectionsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component2.cawLaughSFX = GetNetcodeList(Plugin.CollectionsAudioComponent, indexToLookFor); } else { Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } } else { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.CollectionsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component2.cawScreamSFX = GetNetcodeList(Plugin.CollectionsAudioComponent, indexToLookFor); } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } [ClientRpc] public void SynchronizeBaboonBirdEnemyTypeClientRpc(int indexToLookFor, int password) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3551811024u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexToLookFor); BytePacker.WriteValueBitPacked(val2, password); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3551811024u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on {BaboonBirdAIPatch.baboonType.enemyName} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; BaboonBirdAIPatch.baboonType.audioClips[password] = audioClip; } } } [ClientRpc] public void SynchronizeBlobAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3841572418u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3841572418u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; BlobAI component = ((Component)val3).GetComponent<BlobAI>(); component.agitatedSFX = audioClip; } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } } [ClientRpc] public void SynchronizeBushWolfEnemyClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1916119825u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1916119825u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); PlayAudioAnimationEvent component = ((Component)((Component)val3).transform.GetChild(1)).GetComponent<PlayAudioAnimationEvent>(); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AudioClip[] array = (AudioClip[])(object)new AudioClip[1] { audioClip }; BushWolfEnemy component2 = ((Component)val3).GetComponent<BushWolfEnemy>(); if (!(password == "Snarl")) { if (password == "Calls") { component2.callsClose = array; component2.callsFar = array; return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { component2.snarlSFX = audioClip; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeButlerEnemyAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(797100705u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 797100705u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); ButlerEnemyAI component = ((Component)val3).GetComponent<ButlerEnemyAI>(); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component.footsteps = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; switch (password) { case "Pop": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); component.popAudio.clip = audioClip; component.popAudioFar.clip = audioClip; break; case "Buzzing": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); component.buzzingAmbience.clip = audioClip; component.buzzingAmbience.Play(); break; case "Murder": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on murderMusicAudio to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); ButlerEnemyAI.murderMusicAudio.clip = audioClip; break; default: Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); break; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } [ClientRpc] public void SynchronizeCaveDwellerAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(660414513u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 660414513u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); PlayAudioAnimationEvent component = ((Component)((Component)val3).transform.GetChild(14).GetChild(1)).GetComponent<PlayAudioAnimationEvent>(); component.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; CaveDwellerAI component2 = ((Component)val3).GetComponent<CaveDwellerAI>(); switch (password) { case "Puke": component2.pukeSFX = audioClip; break; case "Bite": component2.biteSFX = audioClip; break; case "FakeCry": { AudioClip[] fakeCrySFX = (AudioClip[])(object)new AudioClip[4] { audioClip, audioClip, audioClip, audioClip }; component2.fakeCrySFX = fakeCrySFX; break; } case "Scream": component2.screamAudio.clip = audioClip; component2.screamAudioNonDiagetic.clip = audioClip; break; default: Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); break; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } [ClientRpc] public void SynchronizeClaySurgeonAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(347141057u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 347141057u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, null, isCollection: true); ClaySurgeonAI component = ((Component)val3).GetComponent<ClaySurgeonAI>(); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.CollectionsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}]"); component.paradeClips = GetNetcodeList(Plugin.CollectionsAudioComponent, indexToLookFor); } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } } [ClientRpc] public void SynchronizeCrawlerAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3688895905u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3688895905u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); PlayAudioAnimationEvent component = ((Component)((Component)val3).transform.GetChild(1).GetChild(1)).GetComponent<PlayAudioAnimationEvent>(); component.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; CrawlerAI component2 = ((Component)val3).GetComponent<CrawlerAI>(); AudioClip[] array = (AudioClip[])(object)new AudioClip[1] { audioClip }; if (!(password == "Roar")) { if (password == "Wall") { component2.hitWallSFX = array; return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { component2.longRoarSFX = array; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeCentipedeAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2618848342u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2618848342u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; CentipedeAI component = ((Component)val3).GetComponent<CentipedeAI>(); AudioClip[] shriekClips = (AudioClip[])(object)new AudioClip[1] { audioClip }; if (!(password == "Cling")) { if (password == "Shriek") { component.shriekClips = shriekClips; return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { component.clingToPlayer3D = audioClip; component.clingingToPlayer2DAudio.clip = audioClip; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeDocileLocustBeesAIClientRpc(int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3423249868u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3423249868u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AudioClip[] audioClips = (AudioClip[])(object)new AudioClip[1] { audioClip }; if (!(password == "Success")) { if (password == "Fail") { Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on " + EnemyAIPatch.docileLocustType.enemyName + " with password " + password)); EnemyAIPatch.docileLocustType.audioClips = EnemyAIPatch.originalLocustClips.ToArray(); return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on {EnemyAIPatch.docileLocustType.enemyName} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); EnemyAIPatch.docileLocustType.audioClips = audioClips; } } [ClientRpc] public void SynchronizeDoorLockClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1062760020u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1062760020u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name}'s DoorLock to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; DoorLock childDoorLock = DoorLockPatch.GetChildDoorLock(((Component)val3).gameObject); childDoorLock.unlockSFX = audioClip; } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } } [ClientRpc] public void SynchronizeDoubleWingAIClientRpc(int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3590083899u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3590083899u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AudioClip[] audioClips = (AudioClip[])(object)new AudioClip[1] { audioClip }; if (!(password == "Success")) { if (password == "Fail") { Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on " + EnemyAIPatch.doublewingType.enemyName + " with password " + password)); EnemyAIPatch.doublewingType.audioClips = EnemyAIPatch.originalManticoilClips.ToArray(); return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on {EnemyAIPatch.doublewingType.enemyName} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); EnemyAIPatch.doublewingType.audioClips = audioClips; } } [ClientRpc] public void SynchronizeEnemyVentClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2540284514u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2540284514u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; PlayAudioAnimationEvent component = ((Component)val3).GetComponent<PlayAudioAnimationEvent>(); component.audioClip = audioClip; } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips"); } } } [ClientRpc] public void SynchronizeEventWhenDroppedItemClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2920385684u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2920385684u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; EventWhenDroppedItem component = ((Component)val3).GetComponent<EventWhenDroppedItem>(); ((GrabbableObject)component).itemProperties.dropSFX = audioClip; } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } } [ClientRpc] public void SynchronizeFlowermanAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2830424158u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2830424158u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); PlayAudioAnimationEvent component = ((Component)((Component)val3).transform.GetChild(1).GetChild(1)).GetComponent<PlayAudioAnimationEvent>(); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component.randomClips2 = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); if (((Object)component.randomClips2[0]).name == "Step1") { component.randomClips = FlowermanAIPatch.originalRustleSFX; return; } for (int i = 0; i < component.randomClips.Length; i++) { component.randomClips[i] = null; } return; } Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; FlowermanAI component2 = ((Component)val3).GetComponent<FlowermanAI>(); switch (password) { case "Kill": component2.crackNeckSFX = audioClip; return; case "Angered": component2.creatureAngerVoice.clip = audioClip; return; case "Found": component.audioClip = audioClip; return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeFlowerSnakeEnemyClientRpc(int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3950594516u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3950594516u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; if (!(password == "Success")) { if (password == "Fail") { Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on " + FlowerSnakeEnemyPatch.flowerSnakeType.enemyName + " with password " + password)); FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[6] = FlowerSnakeEnemyPatch.originalLeaps[0]; FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[7] = FlowerSnakeEnemyPatch.originalLeaps[1]; FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[10] = FlowerSnakeEnemyPatch.originalLeaps[2]; } else { Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } } else { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on {FlowerSnakeEnemyPatch.flowerSnakeType.enemyName} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[6] = audioClip; FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[7] = audioClip; FlowerSnakeEnemyPatch.flowerSnakeType.audioClips[10] = audioClip; } } [ClientRpc] public void SynchronizeForestGiantAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1242703670u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1242703670u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); PlayAudioAnimationEvent component = ((Component)((Component)val3).transform.GetChild(0).GetChild(3)).gameObject.GetComponent<PlayAudioAnimationEvent>(); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); component.randomClips2 = (component.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor)); } else if (password == "Eat") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; component.audioClip2 = audioClip; } else { Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeGrabbableObjectClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2131186090u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2131186090u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AudioClip[] fartAudios = (AudioClip[])(object)new AudioClip[1] { audioClip }; if (!(password == "Remote")) { if (password == "Whoopie") { WhoopieCushionItem component = ((Component)val3).GetComponent<WhoopieCushionItem>(); component.fartAudios = fartAudios; return; } Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); } else { RemoteProp component2 = ((Component)val3).GetComponent<RemoteProp>(); component2.remoteAudio.clip = audioClip; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeHoarderBugAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3315928064u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); bool flag = password != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(password, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3315928064u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor, password); HoarderBugAI component = ((Component)val3).GetComponent<HoarderBugAI>(); if (password == "Footstep") { Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioList with name '{((Object)Plugin.FootstepsAudioComponent.allAudioLists[indexToLookFor]).name}' at index [{indexToLookFor}] with password {password}"); PlayAudioAnimationEvent component2 = ((Component)((Component)val3).transform.GetChild(2).GetChild(2)).GetComponent<PlayAudioAnimationEvent>(); component2.randomClips = GetNetcodeList(Plugin.FootstepsAudioComponent, indexToLookFor); return; } AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; AudioClip[] array = (AudioClip[])(object)new AudioClip[1] { audioClip }; switch (password) { case "ChitterSuccess": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); component.chitterSFX = array; break; case "ChitterFail": Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)val3).name + " with password " + password)); component.chitterSFX = HoarderBugAIPatch.originalChitters; break; case "Screech": Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}"); ((EnemyAI)component).enemyBehaviourStates[2].VoiceClip = audioClip; component.angryScreechSFX = array; break; default: Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!")); break; } } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } [ClientRpc] public void SynchronizeHUDManagerClientRpc(NetworkObjectReference itemNOR, int indexToLookFor) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1370315657u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, indexToLookFor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1370315657u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null)) { indexToLookFor = CheckValidIndexToLookFor(indexToLookFor); Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)val3).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]"); AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip; HUDManager component = ((Component)val3).GetComponent<HUDManager>(); component.newProfitQuotaSFX = audioClip; } else { Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip"); } } } [ClientRpc] public void SynchronizeJesterAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password) { //IL_0024: Unknown result type (might be du