Decompiled source of LethalVocabulary v0.3.1
LethalVocabulary.dll
Decompiled 8 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Speech.Recognition; using System.Speech.Recognition.SrgsGrammar; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalVocabulary.NetcodePatcher; using Microsoft.CodeAnalysis; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [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: AssemblyCompany("LethalVocabulary")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("A mod that makes your vocabulary a little more... lethal.")] [assembly: AssemblyFileVersion("0.3.1.0")] [assembly: AssemblyInformationalVersion("0.3.1")] [assembly: AssemblyProduct("LethalVocabulary")] [assembly: AssemblyTitle("LethalVocabulary")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.3.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>(); } } 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 LethalVocabulary { public enum Category { BaboonHawk, Bracken, BunkerSpider, CoilHead, EarthLeviathan, EyelessDog, ForestKeeper, GhostGirl, HoardingBug, Hygrodere, Jester, Masked, Nutcracker, SnareFlea, SporeLizard, Thumper, CurseWords } public static class CategoryHelper { public static readonly Dictionary<string, Category> EnemyCategories = new Dictionary<string, Category> { { "Baboon hawk", Category.BaboonHawk }, { "Flowerman", Category.Bracken }, { "Bunker Spider", Category.BunkerSpider }, { "Spring", Category.CoilHead }, { "Earth Leviathan", Category.EarthLeviathan }, { "MouthDog", Category.EyelessDog }, { "ForestGiant", Category.ForestKeeper }, { "Girl", Category.GhostGirl }, { "Hoarding bug", Category.HoardingBug }, { "Blob", Category.Hygrodere }, { "Jester", Category.Jester }, { "Masked", Category.Masked }, { "Nutcracker", Category.Nutcracker }, { "Centipede", Category.SnareFlea }, { "Puffer", Category.SporeLizard }, { "Crawler", Category.Thumper } }; public static readonly Dictionary<Category, string> CategoryToConfigWords = new Dictionary<Category, string> { { Category.BaboonHawk, Config.BaboonHawkWords.Value }, { Category.Bracken, Config.BrackenWords.Value }, { Category.BunkerSpider, Config.BunkerSpiderWords.Value }, { Category.CoilHead, Config.CoilHeadWords.Value }, { Category.EarthLeviathan, Config.EarthLeviathanWords.Value }, { Category.EyelessDog, Config.EyelessDogWords.Value }, { Category.ForestKeeper, Config.ForestKeeperWords.Value }, { Category.GhostGirl, Config.GhostGirlWords.Value }, { Category.HoardingBug, Config.HoardingBugWords.Value }, { Category.Hygrodere, Config.HygrodereWords.Value }, { Category.Jester, Config.JesterWords.Value }, { Category.Masked, Config.MaskedWords.Value }, { Category.Nutcracker, Config.NutcrackerWords.Value }, { Category.SnareFlea, Config.SnareFleaWords.Value }, { Category.SporeLizard, Config.SporeLizardWords.Value }, { Category.Thumper, Config.ThumperWords.Value }, { Category.CurseWords, Config.CurseWords.Value } }; public static readonly Dictionary<Category, string> SpacedCategoryNames = new Dictionary<Category, string> { { Category.BaboonHawk, "Baboon Hawk" }, { Category.BunkerSpider, "Bunker Spider" }, { Category.CoilHead, "Coil Head" }, { Category.EarthLeviathan, "Earth Leviathan" }, { Category.EyelessDog, "Eyeless Dog" }, { Category.ForestKeeper, "Forest Keeper" }, { Category.GhostGirl, "Ghost Girl" }, { Category.HoardingBug, "Hoarding Bug" }, { Category.SnareFlea, "Snare Flea" }, { Category.SporeLizard, "Spore Lizard" }, { Category.CurseWords, "Curse Words" } }; } public class Config { public static ConfigEntry<string> ActivePunishment; public static ConfigEntry<int> SharedCategoriesPerMoon; public static ConfigEntry<int> PrivateCategoriesPerMoon; public static ConfigEntry<bool> SharedCategoryHints; public static ConfigEntry<bool> PrivateCategoryHints; public static ConfigEntry<bool> PunishCurseWords; public static ConfigEntry<double> ConfidenceThreshold; public static ConfigEntry<bool> LogRecognitionOutput; public static ConfigEntry<string> BaboonHawkWords; public static ConfigEntry<string> BrackenWords; public static ConfigEntry<string> BunkerSpiderWords; public static ConfigEntry<string> CoilHeadWords; public static ConfigEntry<string> EarthLeviathanWords; public static ConfigEntry<string> EyelessDogWords; public static ConfigEntry<string> ForestKeeperWords; public static ConfigEntry<string> GhostGirlWords; public static ConfigEntry<string> HoardingBugWords; public static ConfigEntry<string> HygrodereWords; public static ConfigEntry<string> JesterWords; public static ConfigEntry<string> MaskedWords; public static ConfigEntry<string> NutcrackerWords; public static ConfigEntry<string> SnareFleaWords; public static ConfigEntry<string> SporeLizardWords; public static ConfigEntry<string> ThumperWords; public static ConfigEntry<string> CurseWords; private readonly string CustomWordTip = "The following words will trigger a punishment when this category is selected.\n" + $"MAX {512} characters including commas. " + $"MAX {128} characters per word.\n" + "Words must be separated by a comma (,). Capitalization does not matter. "; public Config(ConfigFile cfg) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected O, but got Unknown ActivePunishment = cfg.Bind<string>("Gameplay", "Punishment", Punishment.Random.ToString(), new ConfigDescription("The punishment that will happen on the player upon talking about one of the banned categories.", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[6] { Punishment.Random.ToString(), Punishment.Teleport.ToString(), Punishment.Explode.ToString(), Punishment.Flash.ToString(), Punishment.Apologize.ToString(), Punishment.Suffocate.ToString() }), Array.Empty<object>())); SharedCategoriesPerMoon = cfg.Bind<int>("Gameplay", "Shared Categories Per Moon", 1, new ConfigDescription("The number of categories that will be shared among all players each moon. Set this value to 0 to disable shared categories.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 20), Array.Empty<object>())); PrivateCategoriesPerMoon = cfg.Bind<int>("Gameplay", "Private Categories Per Moon", 0, new ConfigDescription("The number of categories that will be randomly selected for each player each moon. Set this value to 0 to disable private categories.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 20), Array.Empty<object>())); SharedCategoryHints = cfg.Bind<bool>("Gameplay", "Shared Category Hints", true, new ConfigDescription("Determines if the selected Shared Categories will be displayed at the start of each moon.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { true, false }), Array.Empty<object>())); PrivateCategoryHints = cfg.Bind<bool>("Gameplay", "Private Category Hints", true, new ConfigDescription("Determines if the selected Private Categories will be displayed at the start of each moon.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { true, false }), Array.Empty<object>())); PunishCurseWords = cfg.Bind<bool>("Gameplay", "Punish Curse Words", false, new ConfigDescription("Determines whether or not players will be punished for swearing. Uses \"Curse Words\" category.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { true, false }), Array.Empty<object>())); ConfidenceThreshold = cfg.Bind<double>("Gameplay", "Confidence Threshold", 0.9, new ConfigDescription("Speech recognized by the mod return with a confidence value. If the confidence of the recognition is above this value, a punishment will trigger.", (AcceptableValueBase)(object)new AcceptableValueRange<double>(0.1, 0.99), Array.Empty<object>())); LogRecognitionOutput = cfg.Bind<bool>("Gameplay", "Log Recognition Output", true, new ConfigDescription("Enabling this setting will show the speech recognition output in the console.\nRecognitions that are above the Confidence Threshold will log as errors to make them more visible.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { true, false }), Array.Empty<object>())); BaboonHawkWords = cfg.Bind<string>("Categories.Entities", "Baboon Hawk", "baboon hawk,baboon,hawk", CustomWordTip); BrackenWords = cfg.Bind<string>("Categories.Entities", "Bracken", "bracken,flowerman", CustomWordTip); BunkerSpiderWords = cfg.Bind<string>("Categories.Entities", "Bunker Spider", "bunker spider,bunker,spider,web", CustomWordTip); CoilHeadWords = cfg.Bind<string>("Categories.Entities", "Coil Head", "coil head,coil,head", CustomWordTip); EarthLeviathanWords = cfg.Bind<string>("Categories.Entities", "Earth Leviathan", "earth leviathan,earth,leviathan,worm", CustomWordTip); EyelessDogWords = cfg.Bind<string>("Categories.Entities", "Eyeless Dog", "eyeless dog,eyeless,dog", CustomWordTip); ForestKeeperWords = cfg.Bind<string>("Categories.Entities", "Forest Keeper", "forest keeper,forest giant,keeper,giant", CustomWordTip); GhostGirlWords = cfg.Bind<string>("Categories.Entities", "Ghost Girl", "ghost girl,ghost,girl,haunt,haunted", CustomWordTip); HoardingBugWords = cfg.Bind<string>("Categories.Entities", "Hoarding Bug", "hoarding bug,loot bug,hoard,loot,bug", CustomWordTip); HygrodereWords = cfg.Bind<string>("Categories.Entities", "Hygrodere", "hygrodere,slime,blob", CustomWordTip); JesterWords = cfg.Bind<string>("Categories.Entities", "Jester", "jester,winding", CustomWordTip); MaskedWords = cfg.Bind<string>("Categories.Entities", "Mimic", "mimic,masked", CustomWordTip); NutcrackerWords = cfg.Bind<string>("Categories.Entities", "Nutcracker", "nutcracker,soldier,shotgun,gun,nut", CustomWordTip); SnareFleaWords = cfg.Bind<string>("Categories.Entities", "Snare Flea", "snare flea,snare,flea,centipede,face hugger", CustomWordTip); SporeLizardWords = cfg.Bind<string>("Categories.Entities", "Spore Lizard", "spore lizard,spore,lizard,puffer", CustomWordTip); ThumperWords = cfg.Bind<string>("Categories.Entities", "Thumper", "thumper,crawler", CustomWordTip); CurseWords = cfg.Bind<string>("Categories.Other", "Curse Words", "fuck,fucking,shit,shitting,bitch,bitching", (ConfigDescription)null); } } [BepInPlugin("LethalVocabulary", "LethalVocabulary", "0.3.1")] public class Plugin : BaseUnityPlugin { public static Plugin Instance; public static GameObject NetcodeHelperPrefab; public static ManualLogSource Console; private Harmony _harmony; public SpeechRecognizer SpeechRecognizer; public static Config Config { get; internal set; } private void Awake() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown 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); } } } AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "netcodehelper")); NetcodeHelperPrefab = val.LoadAsset<GameObject>("Assets/NetcodeHelper/NetcodeHelper.prefab"); NetcodeHelperPrefab.AddComponent<PunishmentManager>(); Instance = this; Console = ((BaseUnityPlugin)this).Logger; SpeechRecognizer = new SpeechRecognizer(); _harmony = new Harmony("LethalVocabulary"); Config = new Config(((BaseUnityPlugin)this).Config); _harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin LethalVocabulary is loaded! Categories will be loaded by the host upon hosting a game."); } public static void DisplayHUDTip(string header, string body, bool isWarning = false) { if ((Object)(object)HUDManager.Instance == (Object)null) { Console.LogWarning((object)("Failed to display HUD tip: " + header + " - " + body)); } else { HUDManager.Instance.DisplayTip(header, body, isWarning, false, "LC_Tip1"); } } public static void TeleportPlayer(ulong clientId, Vector3 teleportPosition) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[clientId]; AudioReverbPresets val2 = Object.FindObjectOfType<AudioReverbPresets>(); if (Object.op_Implicit((Object)(object)val2)) { val2.audioPresets[2].ChangeAudioReverbForPlayer(val); } val.DropAllHeldItems(true, false); val.isInElevator = false; val.isInHangarShipRoom = false; val.isInsideFactory = true; val.averageVelocity = 0f; val.velocityLastFrame = Vector3.zero; val.TeleportPlayer(teleportPosition, false, 0f, false, true); val.beamOutParticle.Play(); if (StartOfRound.Instance.localPlayerController.playerClientId == clientId) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } } public class PunishmentManager : NetworkBehaviour { public static PunishmentManager Instance; public const int CategoryNameMaxLength = 64; public const int CategoryWordsMaxLength = 512; public const int WordMaxLength = 128; private static PlayerControllerB _localPlayer; private static ShipTeleporter _teleporter; private static StunGrenadeItem _stunGrenade; private static GameObject _snareFleaPrefab; public readonly Dictionary<string, HashSet<string>> Categories = new Dictionary<string, HashSet<string>>(); private readonly HashSet<string> _sharedCategories = new HashSet<string>(); private readonly HashSet<string> _privateCategories = new HashSet<string>(); private readonly HashSet<string> _categoryWords = new HashSet<string>(); public readonly NetworkVariable<bool> MoonInProgress = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public Punishment activePunishment; public int sharedCategoriesPerMoon; public int privateCategoriesPerMoon; public bool sharedCategoryHints; public bool privateCategoryHints; private readonly HashSet<string> _forcedCategories = new HashSet<string>(); private Coroutine _apologyTimer; public int apologyIndex = -1; public static readonly string[] Apologies = new string[6] { "I didn't mean to say that.", "I was just kidding.", "I lied, ignore me.", "I will not say that again.", "I will think before speaking.", "I shouldn't have said that." }; public PunishmentManager() { Instance = this; NetworkVariable<bool> moonInProgress = MoonInProgress; moonInProgress.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)moonInProgress.OnValueChanged, (Delegate?)(object)new OnValueChangedDelegate<bool>(OnMoonInProgressChanged)); } public bool StringIsLegal(string message, double confidence = 1.0) { message = message.Trim().ToLower(); if (!MoonInProgress.Value || _localPlayer.isPlayerDead || confidence < Config.ConfidenceThreshold.Value) { return true; } if (!_categoryWords.Any((string word) => message.Contains(word))) { return true; } PunishPlayerServerRpc(_localPlayer.playerClientId); return false; } public void LoadConfig(bool unloadPreviousData = true) { if (unloadPreviousData) { Categories.Clear(); } foreach (KeyValuePair<Category, string> categoryToConfigWord in CategoryHelper.CategoryToConfigWords) { AddCategory(categoryToConfigWord.Key, categoryToConfigWord.Value); } SetPunishmentFromName(Config.ActivePunishment.Value); sharedCategoriesPerMoon = Config.SharedCategoriesPerMoon.Value; privateCategoriesPerMoon = Config.PrivateCategoriesPerMoon.Value; sharedCategoryHints = Config.SharedCategoryHints.Value; privateCategoryHints = Config.PrivateCategoryHints.Value; if (Config.PunishCurseWords.Value) { _forcedCategories.Add(GetCategoryName(Category.CurseWords)); } } public void LoadGameResources() { Plugin.Console.LogInfo((object)"Loading game resources..."); _localPlayer = StartOfRound.Instance.localPlayerController; _teleporter = Resources.FindObjectsOfTypeAll<GameObject>().First((GameObject o) => ((Object)o.gameObject).name.Contains("Inverse")).GetComponent<ShipTeleporter>(); _stunGrenade = Resources.FindObjectsOfTypeAll<GameObject>().First((GameObject o) => Object.op_Implicit((Object)(object)o.GetComponent<StunGrenadeItem>())).GetComponent<StunGrenadeItem>(); HashSet<GameObject> hashSet = new HashSet<GameObject>(); SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { hashSet.UnionWith(val.Enemies.Select((SpawnableEnemyWithRarity o) => o.enemyType.enemyPrefab)); hashSet.UnionWith(val.OutsideEnemies.Select((SpawnableEnemyWithRarity o) => o.enemyType.enemyPrefab)); } _snareFleaPrefab = hashSet.First((GameObject o) => (Object)(object)o.GetComponent<CentipedeAI>() != (Object)null); if ((Object)(object)_teleporter == (Object)null) { Plugin.Console.LogError((object)"Failed to locate Inverse Teleporter resource"); } if ((Object)(object)_stunGrenade == (Object)null) { Plugin.Console.LogError((object)"Failed to locate Stun Grenade resource"); } if ((Object)(object)_snareFleaPrefab == (Object)null) { Plugin.Console.LogError((object)"Failed to locate Snare Flea prefab"); } Plugin.Console.LogInfo((object)"Finished loading game resources!"); } [ServerRpc(RequireOwnership = false)] public void DisplayHUDTipServerRpc(string header, string body, bool isWarning, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(291029043u, val, (RpcDelivery)0); bool flag = header != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(header, false); } bool flag2 = body != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(body, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isWarning, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 291029043u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { DisplayHUDTipClientRpc(header, body, isWarning, clientId); } } [ClientRpc] public void DisplayHUDTipClientRpc(string header, string body, bool isWarning, ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) 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(2847133035u, val, (RpcDelivery)0); bool flag = header != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(header, false); } bool flag2 = body != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(body, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isWarning, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2847133035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId)) { Plugin.DisplayHUDTip(header, body, isWarning); } } private static void OnMoonInProgressChanged(bool prev, bool curr) { Plugin.Console.LogInfo((object)$"MoonInProgress is now {curr}"); } [ServerRpc(RequireOwnership = false)] public void PunishPlayerServerRpc(ulong clientId, bool forceRandom = false) { //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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1952658198u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref forceRandom, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1952658198u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Punishment punishment = activePunishment; if (forceRandom || punishment.Equals(Punishment.Random)) { punishment = (Punishment)Random.RandomRangeInt(1, Enum.GetValues(typeof(Punishment)).Length); } switch (punishment) { case Punishment.Teleport: TeleportPunishmentClientRpc(clientId); break; case Punishment.Explode: ((MonoBehaviour)this).StartCoroutine(DelayExplosionCoroutine(clientId, 1)); break; case Punishment.Flash: CreateFlashAtPositionClientRpc(clientId); break; case Punishment.Apologize: ForceApologyClientRpc(clientId); break; case Punishment.Suffocate: SuffocatePlayerServerRpc(clientId); break; } } } [ClientRpc] public void TeleportPunishmentClientRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) 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(1324576198u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1324576198u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[clientId]; if (_localPlayer.playerClientId == clientId) { GameObject[] insideAINodes = RoundManager.Instance.insideAINodes; Vector3 position = insideAINodes[Random.RandomRangeInt(0, insideAINodes.Length)].transform.position; position = RoundManager.Instance.GetRandomNavMeshPositionInRadiusSpherical(position, 10f, default(NavMeshHit)); ((MonoBehaviour)this).StartCoroutine(TeleportPlayerCoroutine(val3, position, 48)); } val3.beamOutBuildupParticle.Play(); val3.movementAudio.PlayOneShot(_teleporter.teleporterSpinSFX); } } private IEnumerator TeleportPlayerCoroutine(PlayerControllerB player, Vector3 teleportPos, int damage = 0) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(3f); player.movementAudio.Stop(true); TeleportPlayerServerRpc(player.playerClientId, teleportPos, damage); } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerServerRpc(ulong clientId, Vector3 teleportPos, int damage = 0) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3588803987u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos); BytePacker.WriteValueBitPacked(val2, damage); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3588803987u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { TeleportPlayerClientRpc(clientId, teleportPos, damage); } } } [ClientRpc] public void TeleportPlayerClientRpc(ulong clientId, Vector3 teleportPos, int damage = 0) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4254368087u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos); BytePacker.WriteValueBitPacked(val2, damage); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4254368087u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[clientId]; val3.movementAudio.PlayOneShot(_teleporter.teleporterBeamUpSFX); Plugin.TeleportPlayer(clientId, teleportPos); if (damage > 0) { if (val3.health >= damage + 2) { val3.DamagePlayer(damage, true, true, (CauseOfDeath)8, 0, false, default(Vector3)); } else { val3.KillPlayer(Vector3.zero, true, (CauseOfDeath)8, 0); } } } private IEnumerator DelayExplosionCoroutine(ulong clientId, int delaySeconds) { DisplayHUDTipServerRpc("DETONATION IMMINENT", "", isWarning: true, clientId); yield return (object)new WaitForSeconds(1f); Vector3 triggerPosition = ((Component)StartOfRound.Instance.allPlayerScripts[clientId]).transform.position; yield return (object)new WaitForSeconds((float)delaySeconds); CreateExplosionAtPositionServerRpc(clientId, triggerPosition); } [ServerRpc(RequireOwnership = false)] public void CreateExplosionAtPositionServerRpc(ulong clientId, Vector3 triggerPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(42310445u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref triggerPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 42310445u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { CreateExplosionAtPositionClientRpc(clientId, triggerPosition); } } } [ClientRpc] public void CreateExplosionAtPositionClientRpc(ulong clientId, Vector3 triggerPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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(556809539u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref triggerPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 556809539u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Landmine.SpawnExplosion(triggerPosition, true, (_localPlayer.playerClientId == clientId) ? 4f : 0f, 0f); } } } [ClientRpc] public void CreateFlashAtPositionClientRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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(143819092u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 143819092u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && _localPlayer.playerClientId == clientId) { _localPlayer.movementAudio.PlayOneShot(_stunGrenade.explodeSFX); StunGrenadeItem.StunExplosion(((Component)_localPlayer).transform.position, true, 1f, 0f, 1f, false, (PlayerControllerB)null, (PlayerControllerB)null, 0f); _localPlayer.DamagePlayer(30, true, true, (CauseOfDeath)3, 0, false, default(Vector3)); } } } [ClientRpc] public void ForceApologyClientRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) 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(3949414087u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3949414087u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && _localPlayer.playerClientId == clientId) { if (_apologyTimer != null) { Plugin.Console.LogWarning((object)"Apology punishment already active, executing alternative punishment"); PunishPlayerServerRpc(clientId, forceRandom: true); } else { apologyIndex = Random.RandomRangeInt(0, Apologies.Length); _apologyTimer = ((MonoBehaviour)this).StartCoroutine(StartApologyTimer(10)); } } } private IEnumerator StartApologyTimer(int timerSeconds) { if (apologyIndex < 0) { Plugin.Console.LogWarning((object)"An apology was not picked, defaulting to apology 0"); apologyIndex = 0; } Plugin.Console.LogInfo((object)$"APOLOGY TIMER STARTED: {timerSeconds} seconds to type {Apologies[apologyIndex]}"); for (int i = timerSeconds; i > 0; i--) { Plugin.DisplayHUDTip($"APOLOGIZE IN CHAT ({i})", "Send \"" + Apologies[apologyIndex] + "\"", isWarning: true); yield return (object)new WaitForSeconds(1f); } CreateExplosionAtPositionServerRpc(_localPlayer.playerClientId, ((Component)_localPlayer).transform.position); StopApologyTimer(showPassMessage: false); } public void StopApologyTimer(bool showPassMessage = true) { ((MonoBehaviour)this).StopCoroutine(_apologyTimer); _apologyTimer = null; apologyIndex = -1; if (showPassMessage) { Plugin.DisplayHUDTip("Thank you for apologizing.", ""); } Plugin.Console.LogInfo((object)"Apology timer has stopped!"); } [ServerRpc] public void SuffocatePlayerServerRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3149722550u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3149722550u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[clientId]; if (!val3.isInsideFactory) { Plugin.Console.LogWarning((object)"Player not in facility, executing alternative punishment"); PunishPlayerServerRpc(clientId, forceRandom: true); return; } GameObject val4 = Object.Instantiate<GameObject>(_snareFleaPrefab, ((Component)val3).gameObject.transform.position, Quaternion.identity); CentipedeAI component = val4.GetComponent<CentipedeAI>(); ((Component)component).GetComponent<EnemyAI>().enemyHP = 1; ((Component)component).GetComponent<NetworkObject>().Spawn(false); ((MonoBehaviour)this).StartCoroutine(ClingToPlayer(clientId, component)); ((MonoBehaviour)this).StartCoroutine(KillSnareFleaOnStopClinging(component)); } } private static IEnumerator ClingToPlayer(ulong clientId, CentipedeAI snareFlea) { while ((Object)(object)((EnemyAI)snareFlea).agent == (Object)null) { yield return null; } snareFlea.ClingToPlayerServerRpc(clientId); yield return (object)new WaitForSeconds(6.1f); if ((Object)(object)snareFlea.clingingToPlayer != (Object)null) { snareFlea.StopClingingServerRpc(false); } } private static IEnumerator KillSnareFleaOnStopClinging(CentipedeAI snareFlea) { yield return (object)new WaitForSeconds(1f); while ((Object)(object)snareFlea.clingingToPlayer != (Object)null) { if (((EnemyAI)snareFlea).isEnemyDead) { yield break; } yield return null; } ((EnemyAI)snareFlea).KillEnemyOnOwnerClient(false); } private void SetPunishmentFromName(string punishmentName) { if (Enum.TryParse<Punishment>(punishmentName, out var result)) { Plugin.Console.LogInfo((object)("Set active punishment to " + result)); activePunishment = result; } else { Plugin.Console.LogWarning((object)("Punishment \"" + punishmentName + "\" does not exist, set punishment to random")); activePunishment = Punishment.Random; } } [ServerRpc(RequireOwnership = false)] public void RequestSettingsServerRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2914362107u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2914362107u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { string playerUsername = StartOfRound.Instance.allPlayerScripts[clientId].playerUsername; Plugin.Console.LogInfo((object)("Received settings request from " + playerUsername + ", attempting to sync settings")); SyncCategoriesClientRpc(_localPlayer.playerClientId, ((IEnumerable<string>)Categories.Keys).Select((Func<string, FixedString64Bytes>)((string s) => new FixedString64Bytes(s))).ToArray(), ((IEnumerable<HashSet<string>>)Categories.Values).Select((Func<HashSet<string>, FixedString512Bytes>)((HashSet<string> s) => new FixedString512Bytes(string.Join(",", s)))).ToArray(), clientId); SyncActivePunishmentClientRpc(_localPlayer.playerClientId, new FixedString64Bytes(activePunishment.ToString()), clientId); SyncCategoriesPerMoonClientRpc(_localPlayer.playerClientId, sharedCategoriesPerMoon, privateCategoriesPerMoon, clientId); SyncDisplayCategoryHintsClientRpc(_localPlayer.playerClientId, sharedCategoryHints, privateCategoryHints, clientId); SyncForcedCategoriesClientRpc(_localPlayer.playerClientId, ((IEnumerable<string>)_forcedCategories).Select((Func<string, FixedString64Bytes>)((string c) => new FixedString64Bytes(c))).ToArray(), clientId); } } [ClientRpc] public void SyncCategoriesClientRpc(ulong senderId, FixedString64Bytes[] categoryNames, FixedString512Bytes[] categoryWords, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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(2900632521u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, senderId); bool flag = categoryNames != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString64Bytes>(categoryNames, default(ForFixedStrings)); } bool flag2 = categoryWords != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString512Bytes>(categoryWords, default(ForFixedStrings)); } BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2900632521u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId) && !((NetworkBehaviour)_localPlayer).IsHost) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[senderId]; Categories.Clear(); Plugin.Console.LogInfo((object)$"Received {categoryNames.Length} categories from {val3.playerUsername}!"); for (int i = 0; i < categoryNames.Length; i++) { AddCategory(((FixedString64Bytes)(ref categoryNames[i])).Value, ((FixedString512Bytes)(ref categoryWords[i])).Value); } } } [ServerRpc] public void SetActivePunishmentServerRpc(FixedString64Bytes punishmentName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3950622811u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString64Bytes>(ref punishmentName, default(ForFixedStrings)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3950622811u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SyncActivePunishmentClientRpc(_localPlayer.playerClientId, punishmentName, 9999uL); } } [ClientRpc] public void SyncActivePunishmentClientRpc(ulong senderId, FixedString64Bytes punishmentName, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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(2578092699u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, senderId); ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString64Bytes>(ref punishmentName, default(ForFixedStrings)); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2578092699u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[senderId]; Plugin.Console.LogInfo((object)$"Received \"{punishmentName}\" from {val3.playerUsername}"); SetPunishmentFromName(((FixedString64Bytes)(ref punishmentName)).Value); } } } [ServerRpc] public void SetCategoriesPerMoonServerRpc(int shared = -1, int @private = -1) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(686960934u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, shared); BytePacker.WriteValueBitPacked(val2, @private); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 686960934u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { shared = ((shared >= 0) ? shared : sharedCategoriesPerMoon); @private = ((@private >= 0) ? @private : privateCategoriesPerMoon); SyncCategoriesPerMoonClientRpc(_localPlayer.playerClientId, shared, @private, 9999uL); } } [ClientRpc] public void SyncCategoriesPerMoonClientRpc(ulong senderId, int shared, int @private, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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(999163355u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, senderId); BytePacker.WriteValueBitPacked(val2, shared); BytePacker.WriteValueBitPacked(val2, @private); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 999163355u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[senderId]; Plugin.Console.LogInfo((object)($"Received SharedCategoriesPerMoon={shared} and PrivateCategoriesPerMoon={@private} " + "from " + val3.playerUsername)); sharedCategoriesPerMoon = shared; privateCategoriesPerMoon = @private; } } } [ServerRpc] public void SetCategoryHintsServerRpc(bool sharedCategoryHints, bool privateCategoryHints) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4210105047u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref sharedCategoryHints, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref privateCategoryHints, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4210105047u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SyncDisplayCategoryHintsClientRpc(_localPlayer.playerClientId, sharedCategoryHints, privateCategoryHints, 9999uL); } } [ClientRpc] public void SyncDisplayCategoryHintsClientRpc(ulong senderId, bool sharedCategoryHints, bool privateCategoryHints, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) 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(331286102u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, senderId); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref sharedCategoryHints, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref privateCategoryHints, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 331286102u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[senderId]; Plugin.Console.LogInfo((object)($"Received SharedCategoryHints={sharedCategoryHints} and " + $"PrivateCategoryHints={privateCategoryHints} from {val3.playerUsername}")); this.sharedCategoryHints = sharedCategoryHints; this.privateCategoryHints = privateCategoryHints; } } } [ServerRpc] public void SetForcedCategoryStatusServerRpc(Category category, bool setForced) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2801498868u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<Category>(ref category, default(ForEnums)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setForced, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2801498868u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } string categoryName = GetCategoryName(category); if (setForced) { if (!_forcedCategories.Add(categoryName)) { Plugin.Console.LogWarning((object)(categoryName + " is already in the list of Forced Categories!")); return; } Plugin.Console.LogInfo((object)("Added " + categoryName + " to Forced Categories")); } else { if (!_forcedCategories.Remove(categoryName)) { Plugin.Console.LogWarning((object)(categoryName + " is not in the list of Forced Categories ")); return; } Plugin.Console.LogInfo((object)("Removed " + categoryName + " from Forced Categories")); } SyncForcedCategoriesClientRpc(_localPlayer.playerClientId, ((IEnumerable<string>)_forcedCategories).Select((Func<string, FixedString64Bytes>)((string c) => new FixedString64Bytes(c))).ToArray(), 9999uL); } [ClientRpc] public void SyncForcedCategoriesClientRpc(ulong senderId, FixedString64Bytes[] forcedCategories, ulong clientId = 9999uL) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) 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(3306016599u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, senderId); bool flag = forcedCategories != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString64Bytes>(forcedCategories, default(ForFixedStrings)); } BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3306016599u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (clientId == 9999 || _localPlayer.playerClientId == clientId) && !((NetworkBehaviour)_localPlayer).IsHost) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[senderId]; string[] array = forcedCategories.Select((FixedString64Bytes c) => ((FixedString64Bytes)(ref c)).Value).ToArray(); Plugin.Console.LogInfo((object)("Received ForcedCategories=" + string.Join(",", array) + " from " + val3.playerUsername)); _forcedCategories.Clear(); _forcedCategories.UnionWith(array); } } [ServerRpc] public void SetMoonInProgressServerRpc(bool moonInProgress) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(316413038u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref moonInProgress, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 316413038u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { MoonInProgress.Value = moonInProgress; if (moonInProgress) { AddSharedCategoriesClientRpc(PickCategory(sharedCategoriesPerMoon)); AddPrivateCategoriesClientRpc(privateCategoriesPerMoon); UpdateCategoryWordsClientRpc(); StartSpeechRecognitionClientRpc(); DisplayCategoryHintsClientRpc(); } else { DeactivateAllCategoriesClientRpc(); StopSpeechRecognitionClientRpc(); } } } [ClientRpc] public void AddSharedCategoriesClientRpc(FixedString64Bytes[] sharedCategories) { //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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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(3003810836u, val, (RpcDelivery)0); bool flag = sharedCategories != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<FixedString64Bytes>(sharedCategories, default(ForFixedStrings)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3003810836u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { for (int i = 0; i < sharedCategories.Length; i++) { FixedString64Bytes val3 = sharedCategories[i]; _sharedCategories.Add(((FixedString64Bytes)(ref val3)).Value); Plugin.Console.LogInfo((object)("Added Shared Category: " + ((FixedString64Bytes)(ref val3)).Value + " - \"" + string.Join(", ", Categories[((FixedString64Bytes)(ref val3)).Value]) + "\"")); } } } [ClientRpc] public void AddPrivateCategoriesClientRpc(int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) 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(3868831011u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3868831011u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { FixedString64Bytes[] array = PickCategory(amount); for (int i = 0; i < array.Length; i++) { FixedString64Bytes val3 = array[i]; _privateCategories.Add(((FixedString64Bytes)(ref val3)).Value); Plugin.Console.LogInfo((object)("Added Private Category: " + ((FixedString64Bytes)(ref val3)).Value + " - \"" + string.Join(", ", Categories[((FixedString64Bytes)(ref val3)).Value]) + "\"")); } } } [ClientRpc] public void UpdateCategoryWordsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) 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(2705232759u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2705232759u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } _categoryWords.Clear(); foreach (string forcedCategory in _forcedCategories) { _categoryWords.UnionWith(Categories[forcedCategory]); } foreach (string sharedCategory in _sharedCategories) { _categoryWords.UnionWith(Categories[sharedCategory]); } foreach (string privateCategory in _privateCategories) { _categoryWords.UnionWith(Categories[privateCategory]); } LogCategories(); } [ClientRpc] public void DeactivateAllCategoriesClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) 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(2048906094u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2048906094u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { _sharedCategories.Clear(); _privateCategories.Clear(); _categoryWords.Clear(); LogCategories(); } } } [ClientRpc] public void StartSpeechRecognitionClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) 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(501847639u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 501847639u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Plugin.Instance.SpeechRecognizer.StartRecognizer(_categoryWords); } } } [ClientRpc] public void StopSpeechRecognitionClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) 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(2782607887u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2782607887u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Plugin.Instance.SpeechRecognizer.StopRecognizer(); } } } [ClientRpc] public void DisplayCategoryHintsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) 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(3596738529u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3596738529u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { HashSet<string> hashSet = new HashSet<string>(); hashSet.UnionWith(_forcedCategories); if (sharedCategoryHints) { hashSet.UnionWith(_sharedCategories); } if (privateCategoryHints) { hashSet.UnionWith(_privateCategories); } string text = string.Join(", ", hashSet); if (text.Length != 0) { Plugin.DisplayHUDTip("Don't talk about...", text); } } } private FixedString64Bytes[] PickCategory(int amount, bool allowActiveCategories = false) { HashSet<string> hashSet = new HashSet<string>(); HashSet<string> hashSet2 = new HashSet<string>(); SelectableLevel currentLevel = StartOfRound.Instance.currentLevel; if (currentLevel.PlanetName.Equals("71 Gordion")) { return Array.Empty<FixedString64Bytes>(); } hashSet.UnionWith(GetSpawnableEnemiesAsCategories(currentLevel).Select(GetCategoryName)); hashSet.RemoveWhere((string category) => !allowActiveCategories && _forcedCategories.Contains(category)); hashSet.RemoveWhere((string category) => !allowActiveCategories && _sharedCategories.Contains(category)); hashSet.RemoveWhere((string category) => !allowActiveCategories && _privateCategories.Contains(category)); for (int i = 0; i < Math.Max(0, Math.Min(amount, hashSet.Count)); i++) { string item = hashSet.ElementAt(Random.RandomRangeInt(0, hashSet.Count)); hashSet2.Add(item); } return ((IEnumerable<string>)hashSet2).Select((Func<string, FixedString64Bytes>)((string categoryName) => new FixedString64Bytes(categoryName))).ToArray(); } public void AddCategory(string categoryName, string words) { categoryName = categoryName.Trim(); int length = categoryName.Length; int num = length; if (num <= 64) { if (num == 0) { Plugin.Console.LogError((object)("Category with words \"" + words + "\" has no name")); return; } if (Categories.ContainsKey(categoryName)) { Plugin.Console.LogError((object)("A category with the name \"" + categoryName + "\" has already been loaded")); return; } words = string.Join(",", ParseSplitString(words)); if (words.Length > 512) { string text = $"Words for category \"{categoryName}\" exceeds maximum length ({512})"; if (Categories.Count >= Enum.GetValues(typeof(Category)).Length) { Plugin.Console.LogError((object)(text + " and will not be loaded")); return; } Plugin.Console.LogWarning((object)text); words = words.Substring(0, 512); } else if (words.Length == 0) { string text2 = "No words found for category \"" + categoryName + "\""; if (Categories.Count >= Enum.GetValues(typeof(Category)).Length) { Plugin.Console.LogError((object)(text2 + " and will not be loaded")); return; } Plugin.Console.LogWarning((object)text2); } Categories.Add(categoryName, ParseSplitString(words)); Plugin.Console.LogInfo((object)("Loaded category \"" + categoryName + "\" with words \"" + words + "\"")); } else { Plugin.Console.LogError((object)$"Category name \"{categoryName}\" exceeds maximum length ({64})"); } } public void AddCategory(Category category, string words) { AddCategory(GetCategoryName(category), words); } private static HashSet<string> ParseSplitString(string @string, char separator = ',') { HashSet<string> hashSet = new HashSet<string>(); string[] array = @string.ToLower().Split(separator); foreach (string text in array) { string text2 = text.Trim(); int length = text2.Length; int num = length; if (num <= 128) { if (num != 0) { hashSet.Add(text2); } } else { Plugin.Console.LogInfo((object)($"\"{text2}\" exceeds maximum word character length ({128}) " + "and will not be loaded")); } } return hashSet; } private static HashSet<Category> GetSpawnableEnemiesAsCategories(SelectableLevel level) { HashSet<Category> hashSet = new HashSet<Category>(); hashSet.UnionWith(from e in level.Enemies where CategoryHelper.EnemyCategories.ContainsKey(e.enemyType.enemyName) select CategoryHelper.EnemyCategories[e.enemyType.enemyName]); hashSet.UnionWith(from e in level.OutsideEnemies where CategoryHelper.EnemyCategories.ContainsKey(e.enemyType.enemyName) select CategoryHelper.EnemyCategories[e.enemyType.enemyName]); hashSet.UnionWith(from e in level.DaytimeEnemies where CategoryHelper.EnemyCategories.ContainsKey(e.enemyType.enemyName) select CategoryHelper.EnemyCategories[e.enemyType.enemyName]); return hashSet; } private static string GetCategoryName(Category category) { string value; return CategoryHelper.SpacedCategoryNames.TryGetValue(category, out value) ? value : category.ToString(); } private void LogCategories() { Plugin.Console.LogInfo((object)string.Format("Forced Categories ({0}): {1}", _forcedCategories.Count, string.Join(", ", _forcedCategories))); Plugin.Console.LogInfo((object)string.Format("Shared Categories ({0}): {1}", _sharedCategories.Count, string.Join(", ", _sharedCategories))); Plugin.Console.LogInfo((object)string.Format("Private Categories ({0}): {1}", _privateCategories.Count, string.Join(", ", _privateCategories))); Plugin.Console.LogInfo((object)string.Format("Loaded Words ({0}): {1}", _categoryWords.Count, string.Join(", ", _categoryWords))); } public bool IsPunishCurseWords() { return _forcedCategories.Contains(GetCategoryName(Category.CurseWords)); } protected override void __initializeVariables() { if (MoonInProgress == null) { throw new Exception("PunishmentManager.MoonInProgress cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)MoonInProgress).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)MoonInProgress, "MoonInProgress"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)MoonInProgress); ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_PunishmentManager() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Expected O, but got Unknown //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Expected O, but got Unknown //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(291029043u, new RpcReceiveHandler(__rpc_handler_291029043)); NetworkManager.__rpc_func_table.Add(2847133035u, new RpcReceiveHandler(__rpc_handler_2847133035)); NetworkManager.__rpc_func_table.Add(1952658198u, new RpcReceiveHandler(__rpc_handler_1952658198)); NetworkManager.__rpc_func_table.Add(1324576198u, new RpcReceiveHandler(__rpc_handler_1324576198)); NetworkManager.__rpc_func_table.Add(3588803987u, new RpcReceiveHandler(__rpc_handler_3588803987)); NetworkManager.__rpc_func_table.Add(4254368087u, new RpcReceiveHandler(__rpc_handler_4254368087)); NetworkManager.__rpc_func_table.Add(42310445u, new RpcReceiveHandler(__rpc_handler_42310445)); NetworkManager.__rpc_func_table.Add(556809539u, new RpcReceiveHandler(__rpc_handler_556809539)); NetworkManager.__rpc_func_table.Add(143819092u, new RpcReceiveHandler(__rpc_handler_143819092)); NetworkManager.__rpc_func_table.Add(3949414087u, new RpcReceiveHandler(__rpc_handler_3949414087)); NetworkManager.__rpc_func_table.Add(3149722550u, new RpcReceiveHandler(__rpc_handler_3149722550)); NetworkManager.__rpc_func_table.Add(2914362107u, new RpcReceiveHandler(__rpc_handler_2914362107)); NetworkManager.__rpc_func_table.Add(2900632521u, new RpcReceiveHandler(__rpc_handler_2900632521)); NetworkManager.__rpc_func_table.Add(3950622811u, new RpcReceiveHandler(__rpc_handler_3950622811)); NetworkManager.__rpc_func_table.Add(2578092699u, new RpcReceiveHandler(__rpc_handler_2578092699)); NetworkManager.__rpc_func_table.Add(686960934u, new RpcReceiveHandler(__rpc_handler_686960934)); NetworkManager.__rpc_func_table.Add(999163355u, new RpcReceiveHandler(__rpc_handler_999163355)); NetworkManager.__rpc_func_table.Add(4210105047u, new RpcReceiveHandler(__rpc_handler_4210105047)); NetworkManager.__rpc_func_table.Add(331286102u, new RpcReceiveHandler(__rpc_handler_331286102)); NetworkManager.__rpc_func_table.Add(2801498868u, new RpcReceiveHandler(__rpc_handler_2801498868)); NetworkManager.__rpc_func_table.Add(3306016599u, new RpcReceiveHandler(__rpc_handler_3306016599)); NetworkManager.__rpc_func_table.Add(316413038u, new RpcReceiveHandler(__rpc_handler_316413038)); NetworkManager.__rpc_func_table.Add(3003810836u, new RpcReceiveHandler(__rpc_handler_3003810836)); NetworkManager.__rpc_func_table.Add(3868831011u, new RpcReceiveHandler(__rpc_handler_3868831011));