Decompiled source of ShadyMod v1.0.8
BepInEx/plugins/Andy.ShadyMod/Andy.ShadyMod.dll
Decompiled a month agousing System; 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 Andy.ShadyMod.NetcodePatcher; using BepInEx; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using On.GameNetcodeStuff; using ShadyMod.Interactions; using ShadyMod.Model; using ShadyMod.Network; using ShadyMod.Patches; using ShadyMod.Perks; using TMPro; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Andy.ShadyMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.8.0")] [assembly: AssemblyInformationalVersion("1.0.8+6d09e7744e98b8c0fe8da4c25ec9732eafc6ca86")] [assembly: AssemblyProduct("ShadyMod")] [assembly: AssemblyTitle("Andy.ShadyMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.8.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ShadyMod { public static class Helper { private static readonly List<string> ignoreEnemies = new List<string>(2) { "FlowerSnakeEnemy", "DoublewingedBird" }; public static string FormatVector3(this Vector3 vector3) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) return $"{vector3.x}|{vector3.y}|{vector3.z}"; } public static bool IsSmall(this PlayerControllerB playerControllerB) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return ((Component)playerControllerB).transform.localScale.x <= 0.5f; } public static bool GetRandomBoolean() { return Random.value > 0.5f; } public static List<EnemyAI> GetNearbyEnemys(Vector3 playerPos, float detectionRadius = 10f) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) List<EnemyAI> list = new List<EnemyAI>(); foreach (KeyValuePair<ulong, NetworkObject> spawnedObject in NetworkManager.Singleton.SpawnManager.SpawnedObjects) { EnemyAI enemy = ((Component)spawnedObject.Value).GetComponent<EnemyAI>(); if (!((Object)(object)enemy == (Object)null) && !enemy.isEnemyDead && !ignoreEnemies.Any((string e) => ((Object)enemy).name.Contains(e, StringComparison.OrdinalIgnoreCase)) && Vector3.Distance(playerPos, ((Component)enemy).transform.position) <= detectionRadius) { list.Add(enemy); } } return list; } public static void SendChatMessage(string chatMessage) { try { string item = "<color=#FF00FF>Shady</color>: <color=#FFFF00>" + chatMessage + "</color>"; HUDManager.Instance.ChatMessageHistory.Add(item); UpdateChatText(); } catch (Exception ex) { ShadyMod.Logger.LogError((object)("Failed to send chat message: " + ex.Message)); } } public static void DisplayTooltip(string message) { HUDManager.Instance.DisplayTip("ShadyMod", message, false, false, "LC_Tip1"); } private static void UpdateChatText() { ((TMP_Text)HUDManager.Instance.chatText).text = string.Join("\n", HUDManager.Instance.ChatMessageHistory); } } [BepInPlugin("Andy.ShadyMod", "ShadyMod", "1.0.8")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ShadyMod : BaseUnityPlugin { public static AssetBundle? assets = null; private bool isInitalized = false; private float defaultPlayerMovementSpeed = 0f; private Vector3 defaultPlayerScale = Vector3.zero; private Vector3 defaultCameraPos = Vector3.zero; private float defaultJumpForce = 0f; public static List<PerkBase> Perks = new List<PerkBase>(); public static ShadyMod Instance { get; private set; } = null; internal static ManualLogSource Logger { get; private set; } = null; internal static Harmony? Harmony { get; set; } private void Awake() { //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) NetcodePatcher(); Logger = ((BaseUnityPlugin)this).Logger; Instance = this; Patch(); assets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "shady")); if ((Object)(object)assets == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); return; } AssetInfo[] iNSTANCE = AssetInfo.INSTANCE; foreach (AssetInfo assetInfo in iNSTANCE) { Item val = assets.LoadAsset<Item>("Assets/AssetStore/shady/Items/" + assetInfo.Name + ".asset"); if ((Object)(object)val != (Object)null) { Logger.LogDebug((object)$"Loading asset: {assetInfo.Name} with Rarity: {assetInfo.Rarity} ..."); val.canBeGrabbedBeforeGameStart = true; if (assetInfo.ItemType == ItemType.McHead) { val.rotationOffset = new Vector3(180f, 0f, 270f); val.positionOffset = new Vector3(0f, 0.322f, -0.2f); } else if (assetInfo.ItemType == ItemType.Donut || assetInfo.ItemType == ItemType.BadDonut) { val.positionOffset = new Vector3(0f, 0.15f, -0.1f); } else if (assetInfo.ItemType == ItemType.Weight) { val.positionOffset = new Vector3(0f, 0.15f, -0.1f); } else if (assetInfo.ItemType == ItemType.Robot) { val.rotationOffset = new Vector3(0f, 180f, 90f); val.positionOffset = new Vector3(0.4f, 0.3f, -0.1f); } else if (assetInfo.ItemType == ItemType.PlayerBox) { val.rotationOffset = new Vector3(180f, 0f, 270f); val.positionOffset = new Vector3(0f, 0.5f, -0.2f); } Utilities.FixMixerGroups(val.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Items.RegisterScrap(val, assetInfo.Rarity, assetInfo.Moons); if (assetInfo.ItemType == ItemType.PlayerBox) { TerminalNode val2 = assets.LoadAsset<TerminalNode>("Assets/AssetStore/shady/Items/iTerminalNode.asset"); Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, 150); } Logger.LogInfo((object)("Asset " + assetInfo.Name + " successfully registered!")); } else { Logger.LogWarning((object)("Asset " + assetInfo.Name + " not found!")); } } PlayerControllerB.Update += new hook_Update(PlayerControllerB_Update); PlayerControllerB.SwitchToItemSlot += new hook_SwitchToItemSlot(PlayerControllerB_SwitchToItemSlot); PlayerControllerB.DropAllHeldItems += new hook_DropAllHeldItems(PlayerControllerB_DropAllHeldItems); Logger.LogInfo((object)"Andy.ShadyMod v1.0.8 has loaded!"); } private void PlayerControllerB_DropAllHeldItems(orig_DropAllHeldItems orig, PlayerControllerB self, bool itemsFall, bool disconnecting) { orig.Invoke(self, itemsFall, disconnecting); DisablePerks(self); } private void PlayerControllerB_SwitchToItemSlot(orig_SwitchToItemSlot orig, PlayerControllerB self, int slot, GrabbableObject fillSlotWithItem) { orig.Invoke(self, slot, fillSlotWithItem); DisablePerks(self); EnablePerk(self.ItemSlots[slot], self); } private void PlayerControllerB_Update(orig_Update orig, PlayerControllerB self) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!isInitalized) { defaultPlayerMovementSpeed = self.movementSpeed; defaultPlayerScale = new Vector3(((Component)self).transform.localScale.x, ((Component)self).transform.localScale.y, ((Component)self).transform.localScale.z); defaultCameraPos = new Vector3(((Component)self.gameplayCamera).transform.localPosition.x, ((Component)self.gameplayCamera).transform.localPosition.y, ((Component)self.gameplayCamera).transform.localPosition.z); defaultJumpForce = self.jumpForce; Perks = new List<PerkBase>(7) { new SprintPerk(), new SpeedPerk(defaultPlayerMovementSpeed), new ScaleSmallPerk(defaultPlayerScale, defaultJumpForce, defaultCameraPos), new ScaleBigPerk(defaultPlayerScale, defaultJumpForce, defaultCameraPos), new EnemyKillPerk(), new EnemyStunnPerk(), new EnemySmallPerk() }; isInitalized = true; Logger.LogInfo((object)"Shady Mod Initialization complemeted!"); return; } GrabbableObject val = self.ItemSlots[self.currentItemSlot]; if (!((Object)(object)val != (Object)null)) { return; } foreach (PerkBase perk in Perks) { if (perk.ShouldApply(self, val)) { perk.OnUpdate(self); } } } public static void EnablePerk(GrabbableObject item, PlayerControllerB player) { PlayerControllerB player2 = player; GrabbableObject item2 = item; if ((Object)(object)item2 == (Object)null) { return; } Perks.ForEach(delegate(PerkBase p) { if (p.ShouldApply(player2, item2)) { Logger.LogDebug((object)("[PERK]: Applying perk " + p.Name + " ...")); p.Apply(player2); } }); } public static void DisablePerks(PlayerControllerB player, bool force = false) { PlayerControllerB player2 = player; Logger.LogDebug((object)"[PERK]: Disabling all perks..."); Perks.ForEach(delegate(PerkBase p) { p.Reset(player2, force); }); } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("Andy.ShadyMod"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "Andy.ShadyMod"; public const string PLUGIN_NAME = "ShadyMod"; public const string PLUGIN_VERSION = "1.0.8"; } } namespace ShadyMod.Perks { public class EnemyKillPerk : PerkBase { public override string Name => "Enemy Kill"; public override string Description => "Kills all nearby enemys"; public override string TriggerItemName => "lasse"; public override bool CanPerkBeIncreased => false; public override void OnUpdate(PlayerControllerB player) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) base.OnUpdate(player); if (StartOfRound.Instance.inShipPhase) { return; } List<EnemyAI> nearbyEnemys = Helper.GetNearbyEnemys(((Component)player).transform.position, 5f); if (nearbyEnemys.Count <= 0) { return; } bool flag = false; List<string> list = new List<string>(); foreach (EnemyAI item in nearbyEnemys) { ShadyMod.Logger.LogDebug((object)("Killing nearby enemy " + ((Object)item).name + " ...")); if ((Object)(object)item.dieSFX != (Object)null) { player.movementAudio.PlayOneShot(item.dieSFX); } item.KillEnemy(false); list.Add(((Object)item).name.Replace("(Clone)", string.Empty).Replace("(clone)", string.Empty).Replace("Enemy", string.Empty)); flag = true; } if (flag) { Helper.DisplayTooltip("Great job! You killed " + string.Join(", ", list) + "!"); player.DestroyItemInSlotAndSync(player.currentItemSlot); } } } public class EnemySmallPerk : PerkBase { public override string Name => "Enemy Small Perk"; public override string Description => "Scales all nearby enemies small"; public override string TriggerItemName => "patrick"; public override bool CanPerkBeIncreased => false; public override void OnUpdate(PlayerControllerB player) { //IL_0022: 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) base.OnUpdate(player); if (StartOfRound.Instance.inShipPhase) { return; } List<EnemyAI> nearbyEnemys = Helper.GetNearbyEnemys(((Component)player).transform.position, 5f); if (nearbyEnemys.Count <= 0) { return; } bool flag = false; foreach (EnemyAI item in nearbyEnemys) { ShadyMod.Logger.LogDebug((object)("Scaling enemy small: " + ((Object)item).name + " ...")); float num = 0.5f; if (((Object)item).name.Contains("ForestGiant", StringComparison.OrdinalIgnoreCase)) { num = 0.15f; } ((Component)item).transform.localScale = new Vector3(num, num, num); } if (flag) { player.DestroyItemInSlotAndSync(player.currentItemSlot); } } } public class EnemyStunnPerk : PerkBase { public override string Name => "Enemy Stunn Perk"; public override string Description => "Stunns all nearby enemies for 10/30 seconds"; public override string TriggerItemName => "jedon"; public override bool CanPerkBeIncreased => true; public override void OnUpdate(PlayerControllerB player) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) base.OnUpdate(player); if (StartOfRound.Instance.inShipPhase) { return; } List<EnemyAI> nearbyEnemys = Helper.GetNearbyEnemys(((Component)player).transform.position, 5f); if (nearbyEnemys.Count <= 0) { return; } bool flag = false; foreach (EnemyAI item in nearbyEnemys) { if (!((Object)(object)item.stunnedByPlayer != (Object)null) || !(item.stunnedByPlayer.playerUsername == player.playerUsername)) { ShadyMod.Logger.LogDebug((object)("Stunning nearby enemy " + ((Object)item).name + " ...")); if ((Object)(object)item.dieSFX != (Object)null) { player.movementAudio.PlayOneShot(item.dieSFX); } int num = 10; if (ShouldIncreasePerk(player)) { num = 30; } item.SetEnemyStunned(true, (float)num, player); flag = true; } } if (flag) { Helper.DisplayTooltip("You scared the enemys, time to leave (be fast)!"); player.DestroyItemInSlotAndSync(player.currentItemSlot); } } } public abstract class PerkBase { protected bool isApplied = false; public abstract string Name { get; } public abstract string Description { get; } public abstract string TriggerItemName { get; } public abstract bool CanPerkBeIncreased { get; } public virtual void Apply(PlayerControllerB player, bool force = false) { if (CanPerkBeIncreased && ShouldIncreasePerk(player)) { Helper.DisplayTooltip("Your own head? Great! Your perk will be increased! @" + player.playerUsername); } } public virtual void Reset(PlayerControllerB player, bool force = false) { } public virtual void OnUpdate(PlayerControllerB player) { } public virtual bool ShouldApply(PlayerControllerB player, GrabbableObject item) { return ((Object)item).name.Contains(TriggerItemName); } public virtual bool ShouldIncreasePerk(PlayerControllerB player) { return ((Object)player).name.Contains(TriggerItemName, StringComparison.OrdinalIgnoreCase); } } public class ScaleSmallPerk : PerkBase { private const float playerJumpForce = 6f; private const float playerScale = 0.5f; private readonly Vector3 defaultPlayerScale = Vector3.zero; private readonly float defaultPlayerJumpForce = 0f; private readonly Vector3 defaultCameraPos = Vector3.zero; public override string Name => "Scale Small Perk"; public override string Description => "Small crewmate (really smol)"; public override string TriggerItemName => "paul"; public override bool CanPerkBeIncreased => true; public ScaleSmallPerk(Vector3 playerScaleDefault, float playerJumpForceDefault, Vector3 defaultCameraPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) defaultPlayerScale = playerScaleDefault; defaultPlayerJumpForce = playerJumpForceDefault; this.defaultCameraPos = defaultCameraPos; } public override void Apply(PlayerControllerB player, bool force = false) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) base.Apply(player); if (force || !isApplied) { float num = 0.5f; float num2 = 6f; if (ShouldIncreasePerk(player)) { num = 0.4f; num2 -= 1f; } ((Component)player).transform.localScale = new Vector3(num, num, num); ((Component)player.gameplayCamera).transform.localPosition = new Vector3(0f, num, 0f); player.jumpForce = num2; if (!force) { NetworkMessage networkMessage = new NetworkMessage { PlayerName = player.playerUsername, Action = "apply", PerkName = Name, PlayerId = player.actualClientId }; PerkNetworkHandler.Instance.EventServerRpc(networkMessage.ToString()); } if (!force) { isApplied = true; } } } public override void Reset(PlayerControllerB player, bool force = false) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (force || isApplied) { base.Reset(player); ((Component)player).transform.localScale = defaultPlayerScale; ((Component)player.gameplayCamera).transform.localPosition = defaultCameraPos; player.jumpForce = defaultPlayerJumpForce; if (!force) { NetworkMessage networkMessage = new NetworkMessage { PlayerName = player.playerUsername, Action = "reset", PerkName = Name, PlayerId = player.actualClientId }; PerkNetworkHandler.Instance.EventServerRpc(networkMessage.ToString()); } if (!force) { isApplied = false; } } } } public class ScaleBigPerk : PerkBase { private const float playerJumpForce = 20f; private const float playerScale = 1.25f; private readonly Vector3 defaultPlayerScale = Vector3.zero; private readonly float defaultPlayerJumpForce = 0f; private readonly Vector3 defaultCameraPos = Vector3.zero; public override string Name => "Scale Big Perk"; public override string Description => "Big crewmate (fr)"; public override string TriggerItemName => "aveloth"; public override bool CanPerkBeIncreased => true; public ScaleBigPerk(Vector3 playerScaleDefault, float playerJumpForceDefault, Vector3 defaultCameraPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) defaultPlayerScale = playerScaleDefault; defaultPlayerJumpForce = playerJumpForceDefault; this.defaultCameraPos = defaultCameraPos; } public override void Apply(PlayerControllerB player, bool force = false) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) if (force || !isApplied) { base.Apply(player); float num = 1.25f; float num2 = 20f; if (ShouldIncreasePerk(player)) { num += 0.5f; num2 += 2f; } ((Component)player).transform.localScale = new Vector3(num, num, num); ((Component)player.gameplayCamera).transform.localPosition = new Vector3(0f, num, 0f); player.jumpForce = num2; if (!force) { NetworkMessage networkMessage = new NetworkMessage { PlayerName = player.playerUsername, Action = "apply", PerkName = Name, PlayerId = player.actualClientId }; PerkNetworkHandler.Instance.EventServerRpc(networkMessage.ToString()); } if (!force) { isApplied = true; } } } public override void Reset(PlayerControllerB player, bool force = false) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (force || isApplied) { base.Reset(player); ((Component)player).transform.localScale = defaultPlayerScale; ((Component)player.gameplayCamera).transform.localPosition = defaultCameraPos; player.jumpForce = defaultPlayerJumpForce; if (!force) { NetworkMessage networkMessage = new NetworkMessage { PlayerName = player.playerUsername, Action = "reset", PerkName = Name, PlayerId = player.actualClientId }; PerkNetworkHandler.Instance.EventServerRpc(networkMessage.ToString()); } if (!force) { isApplied = false; } } } } public class SpeedPerk : PerkBase { private const float playerMovementSpeedPerk = 10f; private const float movementIncrease = 5f; private readonly float defaultMovementSpeed = 0f; public override string Name => "Speed Perk"; public override string Description => "The player moves faster than normal"; public override string TriggerItemName => "belebt"; public override bool CanPerkBeIncreased => true; public SpeedPerk(float defaultMovementSpeed) { this.defaultMovementSpeed = defaultMovementSpeed; } public override void Apply(PlayerControllerB player, bool force = false) { if (force || !isApplied) { base.Apply(player); player.movementSpeed = 10f; if (ShouldIncreasePerk(player)) { player.movementSpeed += 5f; } if (!force) { isApplied = true; } } } public override void Reset(PlayerControllerB player, bool force = false) { if (force || isApplied) { base.Reset(player); player.movementSpeed = defaultMovementSpeed; if (!force) { isApplied = false; } } } } public class SprintPerk : PerkBase { public override string Name => "Sprint Perk"; public override string Description => "Endless stamina"; public override string TriggerItemName => "andy"; public override bool CanPerkBeIncreased => false; public override void OnUpdate(PlayerControllerB player) { base.OnUpdate(player); player.sprintMeter = 1f; } } } namespace ShadyMod.Patches { [HarmonyPatch] public class GrabbableObjectPatch { public static readonly Dictionary<GrabbableObject, PlayerBoxInfo> PlayerBoxes = new Dictionary<GrabbableObject, PlayerBoxInfo>(); private const int MAX_PLAYER_IN_BOX = 2; [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "ItemActivate")] public static void OnItemActivate(GrabbableObject __instance, bool used, bool buttonDown = true) { if (!AssetInfo.IsShadyItem(((Object)__instance).name)) { return; } ShadyMod.Logger.LogDebug((object)("OnItemActivate called: " + ((Object)__instance).name + "!")); AssetInfo shadyNameByName = AssetInfo.GetShadyNameByName(((Object)__instance).name); if (shadyNameByName == null) { return; } switch (shadyNameByName.ItemType) { case ItemType.McHead: if (!StartOfRound.Instance.inShipPhase) { PlayerTeleportInteraction.Execute(__instance, __instance.playerHeldBy, shadyNameByName); } break; case ItemType.Donut: case ItemType.BadDonut: if (!StartOfRound.Instance.inShipPhase) { DonutInteraction.ExecuteDonutInteraction(__instance, __instance.playerHeldBy, shadyNameByName); } break; case ItemType.Robot: ((Component)__instance).gameObject.GetComponent<AudioSource>().PlayOneShot(__instance.itemProperties.grabSFX, 1f); break; case ItemType.Weight: case ItemType.ShadyDocument: break; } } [HarmonyPrefix] [HarmonyPatch(typeof(GrabbableObject), "DiscardItem")] public static void OnDiscardItem(GrabbableObject __instance) { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) ShadyMod.DisablePerks(__instance.playerHeldBy); if (PlayerBoxes.ContainsKey(__instance)) { foreach (PlayerControllerB item in PlayerBoxes[__instance].Players.ToList()) { RemovePlayerFromBox(__instance, item, disablePerks: true); item.DropAllHeldItems(true, false); } } AssetInfo shadyNameByName = AssetInfo.GetShadyNameByName(((Object)__instance).name); if (shadyNameByName == null || shadyNameByName.ItemType != 0) { return; } ShadyMod.Logger.LogDebug((object)("Item found: " + shadyNameByName.Name)); if (!(shadyNameByName.Name == "head-paul")) { return; } ((Component)__instance).transform.localScale = new Vector3(0.75f, 0.75f, 0.75f); __instance.itemProperties.positionOffset = new Vector3(0f, 0.322f, -0.2f); foreach (KeyValuePair<GrabbableObject, PlayerBoxInfo> playerBox in PlayerBoxes) { PlayerControllerB playerHeldBy = __instance.playerHeldBy; if (playerBox.Value.Players.Contains(playerHeldBy)) { ShadyMod.Logger.LogDebug((object)"Player removed due to head dropped!"); RemovePlayerFromBox(playerBox.Key, playerHeldBy, disablePerks: true); break; } } } [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "GrabItem")] public static void OnGrabItem(GrabbableObject __instance) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) if (!AssetInfo.IsShadyItem(((Object)__instance).name)) { return; } ShadyMod.EnablePerk(__instance, __instance.playerHeldBy); AssetInfo shadyNameByName = AssetInfo.GetShadyNameByName(((Object)__instance).name); if (shadyNameByName.ItemType == ItemType.PlayerBox) { if (!PlayerBoxes.ContainsKey(__instance)) { PlayerBoxes.Add(__instance, new PlayerBoxInfo()); } else if (PlayerBoxes[__instance].Players.Contains(__instance.playerHeldBy)) { RemovePlayerFromBox(__instance, __instance.playerHeldBy); } } else { if (shadyNameByName.ItemType != 0 || !(shadyNameByName.Name == "head-paul")) { return; } ((Component)__instance).transform.localScale = new Vector3(((Component)__instance).transform.localScale.x * 0.5f, ((Component)__instance).transform.localScale.y * 0.5f, ((Component)__instance).transform.localScale.z * 0.5f); __instance.itemProperties.positionOffset = new Vector3(0f, 0.15f, -0.05f); foreach (KeyValuePair<GrabbableObject, PlayerBoxInfo> playerBox in PlayerBoxes) { if (playerBox.Value.Players.Contains(__instance.playerHeldBy)) { RemovePlayerFromBox(playerBox.Key, __instance.playerHeldBy); break; } } } } [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "Update")] public static void OnUpdate(GrabbableObject __instance) { //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) AssetInfo shadyNameByName = AssetInfo.GetShadyNameByName(((Object)__instance).name); if (shadyNameByName == null || shadyNameByName.ItemType != ItemType.PlayerBox) { return; } DateTime now = DateTime.Now; if (!PlayerBoxes.ContainsKey(__instance)) { PlayerBoxes.Add(__instance, new PlayerBoxInfo()); } if ((NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) && (!(PlayerBoxes[__instance].ResetTime > DateTime.MinValue) || !((now - PlayerBoxes[__instance].ResetTime).TotalSeconds < 2.0))) { PlayerBoxes[__instance].ResetTime = DateTime.MinValue; if (!PlayerBoxes[__instance].Discard) { if ((Object)(object)__instance.playerHeldBy == (Object)null && PlayerBoxes[__instance].Players.Count < 2) { for (int i = 0; i < StartOfRound.Instance.allPlayerObjects.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if (Vector3.Distance(((Component)val).transform.position, ((Component)__instance).transform.position) <= 1f && val.IsSmall() && !PlayerBoxes[__instance].Players.Contains(val)) { AddPlayerToBox(__instance, val); } if (PlayerBoxes[__instance].Players.Count >= 2) { break; } } } } else { ShadyMod.Logger.LogDebug((object)"Skipping player add due to discard set!"); } } float num = 0f; List<PlayerControllerB> list = new List<PlayerControllerB>(); foreach (PlayerControllerB player in PlayerBoxes[__instance].Players) { if (!player.IsSmall()) { list.Add(player); continue; } ((Component)player).transform.position = ((Component)__instance).transform.position + new Vector3(num, 0f, num); num += 0.15f; } if (!NetworkManager.Singleton.IsHost && !NetworkManager.Singleton.IsServer) { return; } foreach (PlayerControllerB item in list) { RemovePlayerFromBox(__instance, item); } } public static void AddPlayerToBox(GrabbableObject __instance, PlayerControllerB player) { ShadyMod.Logger.LogDebug((object)("Adding player " + ((Object)player).name + " to box!")); if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { ((Component)__instance).gameObject.GetComponent<AudioSource>().PlayOneShot(__instance.itemProperties.grabSFX, 1f); } PerkNetworkHandler.Instance.AddPlayerToBoxServerRpc(((NetworkBehaviour)__instance).NetworkObjectId, (int)player.playerClientId); player.playerCollider.enabled = false; } public static void RemovePlayerFromBox(GrabbableObject __instance, PlayerControllerB player, bool disablePerks = false) { ShadyMod.Logger.LogDebug((object)("Removing player " + ((Object)player).name + " from box!")); if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { ((Component)__instance).gameObject.GetComponent<AudioSource>().PlayOneShot(__instance.itemProperties.dropSFX, 1f); } PerkNetworkHandler.Instance.RemovePlayerFromBoxServerRpc(((NetworkBehaviour)__instance).NetworkObjectId, (int)player.playerClientId, disablePerks); player.playerCollider.enabled = true; } } [HarmonyPatch] public class NetworkObjectManager { private static GameObject networkPrefab; [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] public static void Init() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (!((Object)(object)networkPrefab != (Object)null)) { networkPrefab = (GameObject)ShadyMod.assets.LoadAsset("PerkNetworkHandler"); networkPrefab.AddComponent<PerkNetworkHandler>(); NetworkManager.Singleton.AddNetworkPrefab(networkPrefab); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "Awake")] private static void SpawnNetworkHandler() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { GameObject val = Object.Instantiate<GameObject>(networkPrefab, Vector3.zero, Quaternion.identity); val.GetComponent<NetworkObject>().Spawn(false); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "Awake")] private static void SubscribeToHandler() { PerkNetworkHandler.MessageEvent += ReceivedEventFromServer; } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "DespawnPropsAtEndOfRound")] private static void UnsubscribeFromHandler() { PerkNetworkHandler.MessageEvent -= ReceivedEventFromServer; } private static void ReceivedEventFromServer(string json) { Debug.Log((object)("Recieved event from server: " + json)); NetworkMessage nm = JsonConvert.DeserializeObject<NetworkMessage>(json); if (nm == null) { return; } Debug.Log((object)("Action to execute is: " + nm.Action)); foreach (KeyValuePair<ulong, NetworkObject> spawnedObject in NetworkManager.Singleton.SpawnManager.SpawnedObjects) { PlayerControllerB component = ((Component)spawnedObject.Value).GetComponent<PlayerControllerB>(); if (!((Object)(object)component != (Object)null) || !(component.playerUsername == nm.PlayerName)) { continue; } Debug.Log((object)("Player found: " + component.playerUsername)); PerkBase perkBase = ShadyMod.Perks.FirstOrDefault((PerkBase p) => p.Name == nm.PerkName); if (perkBase == null) { break; } string action = nm.Action; string text = action; if (!(text == "apply")) { if (text == "reset") { perkBase.Reset(component, force: true); } } else { perkBase.Apply(component, force: true); } } } public static void SendEventToClients(string eventName) { if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { PerkNetworkHandler.Instance.EventClientRpc(eventName); } } } [HarmonyPatch] public class PlayerPatch { [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")] public static void OnPlayerDeath(PlayerControllerB __instance, Vector3 bodyVelocity, bool spawnBody = true, CauseOfDeath causeOfDeath = 0, int deathAnimation = 0, Vector3 positionOffset = default(Vector3)) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) ShadyMod.Logger.LogDebug((object)$"Player {__instance.playerUsername} has died! Cause of death: {causeOfDeath}"); ShadyMod.DisablePerks(__instance); } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerControllerB), "DropAllHeldItems")] public static void OnDropAllHeldItems(PlayerControllerB __instance) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ShadyMod.DisablePerks(__instance); GrabbableObject val = __instance.ItemSlots[__instance.currentItemSlot]; if (__instance.IsSmall() && (Object)(object)val != (Object)null) { ((Component)val).transform.localScale = new Vector3(0.75f, 0.75f, 0.75f); val.itemProperties.positionOffset = new Vector3(0f, 0.322f, -0.2f); } if (!((Object)(object)val != (Object)null)) { return; } AssetInfo shadyNameByName = AssetInfo.GetShadyNameByName(((Object)val).name); if (shadyNameByName.ItemType != ItemType.PlayerBox) { return; } foreach (KeyValuePair<GrabbableObject, PlayerBoxInfo> playerBox in GrabbableObjectPatch.PlayerBoxes) { if (!((Object)(object)playerBox.Key == (Object)(object)val)) { continue; } foreach (PlayerControllerB player in playerBox.Value.Players) { GrabbableObjectPatch.RemovePlayerFromBox(playerBox.Key, player, disablePerks: true); } } } } } namespace ShadyMod.Network { public class PerkNetworkHandler : NetworkBehaviour { public static PerkNetworkHandler Instance { get; private set; } public static event Action<string>? MessageEvent; public override void OnNetworkSpawn() { PerkNetworkHandler.MessageEvent = null; if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { PerkNetworkHandler instance = Instance; if (instance != null) { GameObject gameObject = ((Component)instance).gameObject; if (gameObject != null) { NetworkObject component = gameObject.GetComponent<NetworkObject>(); if (component != null) { component.Despawn(true); } } } } Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } [ClientRpc] public void EventClientRpc(string eventName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00ba: 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(2030828849u, val, (RpcDelivery)0); bool flag = eventName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(eventName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2030828849u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PerkNetworkHandler.MessageEvent?.Invoke(eventName); } } [ServerRpc(RequireOwnership = false)] public void EventServerRpc(string eventName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00ba: 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(1747992973u, val, (RpcDelivery)0); bool flag = eventName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(eventName, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1747992973u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { EventClientRpc(eventName); } } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerOutServerRpc(int playerObj, Vector3 teleportPos) { //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(4246910149u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerObj); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4246910149u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { TeleportPlayerOutClientRpc(playerObj, teleportPos); } } } [ClientRpc] public void TeleportPlayerOutClientRpc(int playerObj, Vector3 teleportPos) { //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_00e4: 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(2810027324u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerObj); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2810027324u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerObj]; val3.TeleportPlayer(teleportPos, false, 0f, false, true); } } } [ServerRpc(RequireOwnership = false)] public void AddPlayerToBoxServerRpc(ulong networkObjId, int playerObj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1118754106u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjId); BytePacker.WriteValueBitPacked(val2, playerObj); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1118754106u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { AddPlayerToBoxClientRpc(networkObjId, playerObj); } } } [ClientRpc] public void AddPlayerToBoxClientRpc(ulong networkObjId, int playerObj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3127824493u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjId); BytePacker.WriteValueBitPacked(val2, playerObj); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3127824493u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } foreach (KeyValuePair<ulong, NetworkObject> spawnedObject in ((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects) { if (spawnedObject.Value.NetworkObjectId != networkObjId) { continue; } GrabbableObject component = ((Component)spawnedObject.Value).GetComponent<GrabbableObject>(); PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerObj]; ShadyMod.Logger.LogDebug((object)("Adding player " + ((Object)val3).name + " to box (RPC)!")); if (GrabbableObjectPatch.PlayerBoxes.ContainsKey(component)) { if (!GrabbableObjectPatch.PlayerBoxes[component].Players.Contains(val3)) { GrabbableObjectPatch.PlayerBoxes[component].Players.Add(val3); } } else { GrabbableObjectPatch.PlayerBoxes.Add(component, new PlayerBoxInfo { Players = new List<PlayerControllerB>(1) { val3 } }); } val3.playerCollider.enabled = false; } } [ServerRpc(RequireOwnership = false)] public void RemovePlayerFromBoxServerRpc(ulong networkObjId, int playerObj, bool disablePerks) { //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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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(4245653801u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjId); BytePacker.WriteValueBitPacked(val2, playerObj); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref disablePerks, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4245653801u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RemovePlayerFromBoxClientRpc(networkObjId, playerObj, disablePerks); ResetDiscardClientRpc(networkObjId); } } } [ClientRpc] public void ResetDiscardClientRpc(ulong networkObjId) { //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(2958249535u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2958249535u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } DateTime now = DateTime.Now; foreach (KeyValuePair<ulong, NetworkObject> spawnedObject in ((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects) { if (spawnedObject.Value.NetworkObjectId == networkObjId) { GrabbableObject component = ((Component)spawnedObject.Value).GetComponent<GrabbableObject>(); GrabbableObjectPatch.PlayerBoxes[component].ResetTime = now; GrabbableObjectPatch.PlayerBoxes[component].Discard = false; } } } [ClientRpc] public void RemovePlayerFromBoxClientRpc(ulong networkObjId, int playerObj, bool disablePerks) { //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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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(2673985171u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjId); BytePacker.WriteValueBitPacked(val2, playerObj); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref disablePerks, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2673985171u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } foreach (KeyValuePair<ulong, NetworkObject> spawnedObject in ((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects) { if (spawnedObject.Value.NetworkObjectId != networkObjId) { continue; } GrabbableObject component = ((Component)spawnedObject.Value).GetComponent<GrabbableObject>(); PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerObj]; ShadyMod.Logger.LogDebug((object)("Removing player " + ((Object)val3).name + " from box (RPC)!")); if (GrabbableObjectPatch.PlayerBoxes.ContainsKey(component) && GrabbableObjectPatch.PlayerBoxes[component].Players.Contains(val3)) { GrabbableObjectPatch.PlayerBoxes[component].Discard = true; GrabbableObjectPatch.PlayerBoxes[component].Players.Remove(val3); ((Component)val3).transform.position = ((Component)component).transform.position + new Vector3(1.25f, 0f, 1.25f); val3.playerCollider.enabled = true; if (disablePerks) { ShadyMod.DisablePerks(val3, force: true); } } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_PerkNetworkHandler() { //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 NetworkManager.__rpc_func_table.Add(2030828849u, new RpcReceiveHandler(__rpc_handler_2030828849)); NetworkManager.__rpc_func_table.Add(1747992973u, new RpcReceiveHandler(__rpc_handler_1747992973)); NetworkManager.__rpc_func_table.Add(4246910149u, new RpcReceiveHandler(__rpc_handler_4246910149)); NetworkManager.__rpc_func_table.Add(2810027324u, new RpcReceiveHandler(__rpc_handler_2810027324)); NetworkManager.__rpc_func_table.Add(1118754106u, new RpcReceiveHandler(__rpc_handler_1118754106)); NetworkManager.__rpc_func_table.Add(3127824493u, new RpcReceiveHandler(__rpc_handler_3127824493)); NetworkManager.__rpc_func_table.Add(4245653801u, new RpcReceiveHandler(__rpc_handler_4245653801)); NetworkManager.__rpc_func_table.Add(2958249535u, new RpcReceiveHandler(__rpc_handler_2958249535)); NetworkManager.__rpc_func_table.Add(2673985171u, new RpcReceiveHandler(__rpc_handler_2673985171)); } private static void __rpc_handler_2030828849(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string eventName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref eventName, false); } target.__rpc_exec_stage = (__RpcExecStage)2; ((PerkNetworkHandler)(object)target).EventClientRpc(eventName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1747992973(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string eventName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref eventName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((PerkNetworkHandler)(object)target).EventServerRpc(eventName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4246910149(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); Vector3 teleportPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref teleportPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((PerkNetworkHandler)(object)target).TeleportPlayerOutServerRpc(playerObj, teleportPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2810027324(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); Vector3 teleportPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref teleportPos); target.__rpc_exec_stage = (__RpcExecStage)2; ((PerkNetworkHandler)(object)target).TeleportPlayerOutClientRpc(playerObj, teleportPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1118754106(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjId); int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)1; ((PerkNetworkHandler)(object)target).AddPlayerToBoxServerRpc(networkObjId, playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3127824493(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjId); int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)2; ((PerkNetworkHandler)(object)target).AddPlayerToBoxClientRpc(networkObjId, playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4245653801(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjId); int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); bool disablePerks = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref disablePerks, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PerkNetworkHandler)(object)target).RemovePlayerFromBoxServerRpc(networkObjId, playerObj, disablePerks); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2958249535(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjId); target.__rpc_exec_stage = (__RpcExecStage)2; ((PerkNetworkHandler)(object)target).ResetDiscardClientRpc(networkObjId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2673985171(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjId); int playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); bool disablePerks = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref disablePerks, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((PerkNetworkHandler)(object)target).RemovePlayerFromBoxClientRpc(networkObjId, playerObj, disablePerks); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "PerkNetworkHandler"; } } } namespace ShadyMod.Model { public class AssetInfo { public static readonly AssetInfo[] INSTANCE = new AssetInfo[15] { new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-belebt", PrefabName = "belebt", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-paul", PrefabName = "paul", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-lasse", PrefabName = "lasse", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-aveloth", PrefabName = "aveloth", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-andy", PrefabName = "andy", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-jedon", PrefabName = "jedon", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "head-patrick", PrefabName = "patrick", ItemType = ItemType.McHead, Rarity = 35 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "donut", PrefabName = "donut", ItemType = ItemType.Donut, Rarity = 55 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "bad-donut", PrefabName = "donut-bad", ItemType = ItemType.BadDonut, Rarity = 55 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "weight", PrefabName = "weight", ItemType = ItemType.Weight, Rarity = 65 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "shadydoc1", PrefabName = "ShadyDocument1", ItemType = ItemType.ShadyDocument, Rarity = 25 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "shadydoc2", PrefabName = "ShadyDocument2", ItemType = ItemType.ShadyDocument, Rarity = 25 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "shadydoc3", PrefabName = "ShadyDocument3", ItemType = ItemType.ShadyDocument, Rarity = 25 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "robot", PrefabName = "robot", ItemType = ItemType.Robot, Rarity = 20 }, new AssetInfo { Moons = (LevelTypes)(-1), Name = "playerbox", PrefabName = "playerbox", ItemType = ItemType.PlayerBox, Rarity = 15 } }; public string Name { get; set; } = string.Empty; public string PrefabName { get; set; } = string.Empty; public int Rarity { get; set; } = 0; public ItemType ItemType { get; set; } public LevelTypes Moons { get; set; } = (LevelTypes)(-1); public static bool IsShadyItem(string name) { return GetShadyNameByName(name) != null; } public static AssetInfo GetShadyNameByName(string name) { string searchName = name.ToLower().Replace("(clone)", string.Empty); return INSTANCE.FirstOrDefault((AssetInfo p) => p.PrefabName.ToLower() == searchName); } } public enum ItemType { McHead, Donut, BadDonut, Weight, ShadyDocument, Robot, PlayerBox } public class NetworkMessage { public ulong PlayerId { get; set; } = 0uL; public string PlayerName { get; set; } = string.Empty; public string Action { get; set; } = string.Empty; public string PerkName { get; set; } = string.Empty; public override string ToString() { return JsonConvert.SerializeObject((object)this, (Formatting)0); } } public class PlayerBoxInfo { public List<PlayerControllerB> Players { get; set; } = new List<PlayerControllerB>(); public bool Discard { get; set; } = false; public DateTime ResetTime { get; set; } = DateTime.MinValue; } } namespace ShadyMod.Interactions { public static class DonutInteraction { public static void ExecuteDonutInteraction(GrabbableObject currentItem, PlayerControllerB self, AssetInfo itemInfo) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (itemInfo.ItemType == ItemType.BadDonut) { Helper.DisplayTooltip("That was a bad idea ..."); self.DamagePlayer(50, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); self.DropAllHeldItems(true, false); } else { self.MakeCriticallyInjured(false); } ShadyMod.DisablePerks(self); self.DestroyItemInSlotAndSync(self.currentItemSlot); } } public static class PlayerTeleportInteraction { private const float teleportOffset = 0.5f; private static readonly Dictionary<string, string> SteamNameMapping = new Dictionary<string, string> { { "belebt", "belebt" }, { "paul", "vette" }, { "lasse", "Lasse" }, { "aveloth", "aveloth" }, { "andy", "Andy" }, { "jedon", "JedonFT" }, { "patrick", "kxmischFxC" } }; public static void Execute(GrabbableObject currentItem, PlayerControllerB self, AssetInfo itemInfo) { //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_0103: 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) string text = ((Object)currentItem).name.ToLower().Replace("(clone)", string.Empty); ShadyMod.Logger.LogDebug((object)("Item Search Name: " + text)); if (SteamNameMapping.ContainsKey(text)) { string text2 = SteamNameMapping[text]; bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerObjects.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if (!val.playerUsername.Contains(text2, StringComparison.OrdinalIgnoreCase)) { continue; } if (val.playerUsername == self.playerUsername) { return; } ShadyMod.Logger.LogDebug((object)("Player found: " + val.playerUsername + " ...")); if (val.isPlayerDead) { bool flag2 = true; if ((Object)(object)val.deadBody != (Object)null) { flag2 = Helper.GetRandomBoolean(); } if (flag2) { self.KillPlayer(Vector3.zero, false, (CauseOfDeath)15, 0, default(Vector3)); } else { Helper.DisplayTooltip("Lucky you (@" + val.playerUsername + ")! Maybe you can bring back the dead body!"); HUDManager.Instance.ShakeCamera((ScreenShakeType)0); PerkNetworkHandler.Instance.TeleportPlayerOutServerRpc((int)self.playerClientId, new Vector3(val.deadBody.spawnPosition.x + 0.5f, val.deadBody.spawnPosition.y, val.deadBody.spawnPosition.z + 0.5f)); ShadyMod.DisablePerks(self); } } else { ShadyMod.Logger.LogDebug((object)("Teleporting player " + val.playerUsername)); HUDManager.Instance.ShakeCamera((ScreenShakeType)0); PerkNetworkHandler.Instance.TeleportPlayerOutServerRpc((int)self.playerClientId, new Vector3(((Component)val).transform.position.x + 0.5f, ((Component)((Component)val).transform).transform.position.y, ((Component)val).transform.position.z + 0.5f)); ShadyMod.DisablePerks(self); } flag = true; break; } if (!flag) { ShadyMod.Logger.LogWarning((object)("Target Player \"" + text2 + "\" not found to teleport to!")); Helper.DisplayTooltip("Target Player \"" + text2 + "\" not found to teleport to (@" + self.playerUsername + ")!"); return; } } else { ShadyMod.Logger.LogWarning((object)"Name-Mapping not found!"); } self.DestroyItemInSlotAndSync(self.currentItemSlot); ShadyMod.DisablePerks(self); } } } namespace Andy.ShadyMod.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }
BepInEx/plugins/Andy.ShadyMod/MMHOOK_Assembly-CSharp.dll
Decompiled a month 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.ComponentModel; using System.Diagnostics; using System.Reflection; using DigitalRuby.ThunderAndLightning; using Discord; using Dissonance; using Dissonance.Integrations.Unity_NFGO; using DunGen; using DunGen.Adapters; using DunGen.Analysis; using DunGen.Editor; using DunGen.Graph; using DunGen.Tags; using GameNetcodeStuff; using MonoMod.Cil; using MonoMod.RuntimeDetour.HookGen; using On; using On.DigitalRuby.ThunderAndLightning; using On.Dissonance.Integrations.Unity_NFGO; using On.DunGen; using On.DunGen.Adapters; using On.DunGen.Analysis; using On.DunGen.Editor; using On.DunGen.Graph; using On.DunGen.Tags; using On.GameNetcodeStuff; using On.__GEN; using Steamworks; using Steamworks.Data; using TMPro; using Unity.AI.Navigation; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.InputSystem; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Video; [assembly: AssemblyVersion("0.0.0.0")] namespace On { public static class ActivateObjectAfterSceneLoad { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Start(ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Start(orig_Start orig, ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator orig_waitForNavMeshBake(ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator hook_waitForNavMeshBake(orig_waitForNavMeshBake orig, ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetInitialState(ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetInitialState(orig_SetInitialState orig, ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(ActivateObjectAfterSceneLoad self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, ActivateObjectAfterSceneLoad self); public static event hook_Start Start { add { HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_waitForNavMeshBake waitForNavMeshBake { add { HookEndpointManager.Add<hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetInitialState SetInitialState { add { HookEndpointManager.Add<hook_SetInitialState>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetInitialState>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class ActivateObjectAfterSceneLoad { public static event Manipulator Start { add { HookEndpointManager.Modify<On.ActivateObjectAfterSceneLoad.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.ActivateObjectAfterSceneLoad.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator waitForNavMeshBake { add { HookEndpointManager.Modify<On.ActivateObjectAfterSceneLoad.hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.ActivateObjectAfterSceneLoad.hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator SetInitialState { add { HookEndpointManager.Modify<On.ActivateObjectAfterSceneLoad.hook_SetInitialState>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.ActivateObjectAfterSceneLoad.hook_SetInitialState>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.ActivateObjectAfterSceneLoad.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.ActivateObjectAfterSceneLoad.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AlarmButton { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_PushAlarmButton(AlarmButton self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_PushAlarmButton(orig_PushAlarmButton orig, AlarmButton self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Update(AlarmButton self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Update(orig_Update orig, AlarmButton self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AlarmButton self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AlarmButton self); public static event hook_PushAlarmButton PushAlarmButton { add { HookEndpointManager.Add<hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Update Update { add { HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AlarmButton { public static event Manipulator PushAlarmButton { add { HookEndpointManager.Modify<On.AlarmButton.hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AlarmButton.hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator Update { add { HookEndpointManager.Modify<On.AlarmButton.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AlarmButton.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AlarmButton.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AlarmButton.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AnimatedItem { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Start(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Start(orig_Start orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_EquipItem(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_EquipItem(orig_EquipItem orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DiscardItem(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DiscardItem(orig_DiscardItem orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_PocketItem(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_PocketItem(orig_PocketItem orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Update(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Update(orig_Update orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___initializeVariables(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___initializeVariables(orig___initializeVariables orig, AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string orig___getTypeName(AnimatedItem self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string hook___getTypeName(orig___getTypeName orig, AnimatedItem self); public static event hook_Start Start { add { HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_EquipItem EquipItem { add { HookEndpointManager.Add<hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DiscardItem DiscardItem { add { HookEndpointManager.Add<hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_PocketItem PocketItem { add { HookEndpointManager.Add<hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Update Update { add { HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook___initializeVariables __initializeVariables { add { HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook___getTypeName __getTypeName { add { HookEndpointManager.Add<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AnimatedItem { public static event Manipulator Start { add { HookEndpointManager.Modify<On.AnimatedItem.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator EquipItem { add { HookEndpointManager.Modify<On.AnimatedItem.hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator DiscardItem { add { HookEndpointManager.Modify<On.AnimatedItem.hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator PocketItem { add { HookEndpointManager.Modify<On.AnimatedItem.hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator Update { add { HookEndpointManager.Modify<On.AnimatedItem.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AnimatedItem.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator __initializeVariables { add { HookEndpointManager.Modify<On.AnimatedItem.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator __getTypeName { add { HookEndpointManager.Modify<On.AnimatedItem.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedItem.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AnimatedObjectFloatSetter { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_KillPlayerAtPoint(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_KillPlayerAtPoint(orig_KillPlayerAtPoint orig, AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Start(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Start(orig_Start orig, AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator orig_waitForNavMeshBake(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator hook_waitForNavMeshBake(orig_waitForNavMeshBake orig, AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Update(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Update(orig_Update orig, AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetObjectBasedOnAnimatorFloat(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetObjectBasedOnAnimatorFloat(orig_SetObjectBasedOnAnimatorFloat orig, AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AnimatedObjectFloatSetter self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AnimatedObjectFloatSetter self); public static event hook_KillPlayerAtPoint KillPlayerAtPoint { add { HookEndpointManager.Add<hook_KillPlayerAtPoint>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_KillPlayerAtPoint>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Start Start { add { HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_waitForNavMeshBake waitForNavMeshBake { add { HookEndpointManager.Add<hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Update Update { add { HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetObjectBasedOnAnimatorFloat SetObjectBasedOnAnimatorFloat { add { HookEndpointManager.Add<hook_SetObjectBasedOnAnimatorFloat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetObjectBasedOnAnimatorFloat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AnimatedObjectFloatSetter { public static event Manipulator KillPlayerAtPoint { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_KillPlayerAtPoint>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_KillPlayerAtPoint>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator Start { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator waitForNavMeshBake { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_waitForNavMeshBake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator Update { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator SetObjectBasedOnAnimatorFloat { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_SetObjectBasedOnAnimatorFloat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_SetObjectBasedOnAnimatorFloat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AnimatedObjectFloatSetter.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedObjectFloatSetter.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AnimatedTextureUV { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_OnEnable(AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_OnEnable(orig_OnEnable orig, AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_OnDisable(AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_OnDisable(orig_OnDisable orig, AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator orig_AnimateUV(AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator hook_AnimateUV(orig_AnimateUV orig, AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AnimatedTextureUV self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AnimatedTextureUV self); public static event hook_OnEnable OnEnable { add { HookEndpointManager.Add<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_OnDisable OnDisable { add { HookEndpointManager.Add<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_AnimateUV AnimateUV { add { HookEndpointManager.Add<hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AnimatedTextureUV { public static event Manipulator OnEnable { add { HookEndpointManager.Modify<On.AnimatedTextureUV.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator OnDisable { add { HookEndpointManager.Modify<On.AnimatedTextureUV.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator AnimateUV { add { HookEndpointManager.Modify<On.AnimatedTextureUV.hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AnimatedTextureUV.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AnimationStopPoints { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAnimationStopPosition1(AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAnimationStopPosition1(orig_SetAnimationStopPosition1 orig, AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAnimationGo(AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAnimationGo(orig_SetAnimationGo orig, AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAnimationStopPosition2(AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAnimationStopPosition2(orig_SetAnimationStopPosition2 orig, AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AnimationStopPoints self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AnimationStopPoints self); public static event hook_SetAnimationStopPosition1 SetAnimationStopPosition1 { add { HookEndpointManager.Add<hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetAnimationGo SetAnimationGo { add { HookEndpointManager.Add<hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetAnimationStopPosition2 SetAnimationStopPosition2 { add { HookEndpointManager.Add<hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AnimationStopPoints { public static event Manipulator SetAnimationStopPosition1 { add { HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator SetAnimationGo { add { HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator SetAnimationStopPosition2 { add { HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AnimationStopPoints.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AudioReverbPresets { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AudioReverbPresets self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AudioReverbPresets self); public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AudioReverbPresets { public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AudioReverbPresets.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AudioReverbPresets.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class AutoParentToShip { [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Awake(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Awake(orig_Awake orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_LateUpdate(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_LateUpdate(orig_LateUpdate orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartSuckingOutOfShip(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartSuckingOutOfShip(orig_StartSuckingOutOfShip orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator orig_SuckObjectOutOfShip(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator hook_SuckObjectOutOfShip(orig_SuckObjectOutOfShip orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_MoveToOffset(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_MoveToOffset(orig_MoveToOffset orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___initializeVariables(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___initializeVariables(orig___initializeVariables orig, AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string orig___getTypeName(AutoParentToShip self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string hook___getTypeName(orig___getTypeName orig, AutoParentToShip self); public static event hook_Awake Awake { add { HookEndpointManager.Add<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_LateUpdate LateUpdate { add { HookEndpointManager.Add<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StartSuckingOutOfShip StartSuckingOutOfShip { add { HookEndpointManager.Add<hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SuckObjectOutOfShip SuckObjectOutOfShip { add { HookEndpointManager.Add<hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_MoveToOffset MoveToOffset { add { HookEndpointManager.Add<hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ctor ctor { add { HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook___initializeVariables __initializeVariables { add { HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook___getTypeName __getTypeName { add { HookEndpointManager.Add<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } } } namespace IL { public static class AutoParentToShip { public static event Manipulator Awake { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator LateUpdate { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator StartSuckingOutOfShip { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator SuckObjectOutOfShip { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator MoveToOffset { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator ctor { add { HookEndpointManager.Modify<On.AutoParentToShip.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator __initializeVariables { add { HookEndpointManager.Modify<On.AutoParentToShip.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } public static event Manipulator __getTypeName { add { HookEndpointManager.Modify<On.AutoParentToShip.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } remove { HookEndpointManager.Unmodify<On.AutoParentToShip.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value); } } } } namespace On { public static class BaboonBirdAI { [EditorBrowsable(EditorBrowsableState.Never)] public delegate int orig_IVisibleThreat_SendSpecialBehaviour(BaboonBirdAI self, int id); [EditorBrowsable(EditorBrowsableState.Never)] public delegate int hook_IVisibleThreat_SendSpecialBehaviour(orig_IVisibleThreat_SendSpecialBehaviour orig, BaboonBirdAI self, int id); [EditorBrowsable(EditorBrowsableState.Never)] public delegate int orig_IVisibleThreat_GetThreatLevel(BaboonBirdAI self, Vector3 seenByPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate int hook_IVisibleThreat_GetThreatLevel(orig_IVisibleThreat_GetThreatLevel orig, BaboonBirdAI self, Vector3 seenByPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate int orig_IVisibleThreat_GetInterestLevel(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate int hook_IVisibleThreat_GetInterestLevel(orig_IVisibleThreat_GetInterestLevel orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Transform orig_IVisibleThreat_GetThreatLookTransform(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Transform hook_IVisibleThreat_GetThreatLookTransform(orig_IVisibleThreat_GetThreatLookTransform orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Transform orig_IVisibleThreat_GetThreatTransform(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Transform hook_IVisibleThreat_GetThreatTransform(orig_IVisibleThreat_GetThreatTransform orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Vector3 orig_IVisibleThreat_GetThreatVelocity(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate Vector3 hook_IVisibleThreat_GetThreatVelocity(orig_IVisibleThreat_GetThreatVelocity orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float orig_IVisibleThreat_GetVisibility(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float hook_IVisibleThreat_GetVisibility(orig_IVisibleThreat_GetVisibility orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Start(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Start(orig_Start orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SyncInitialValuesServerRpc(BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SyncInitialValuesServerRpc(orig_SyncInitialValuesServerRpc orig, BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SyncInitialValuesClientRpc(BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SyncInitialValuesClientRpc(orig_SyncInitialValuesClientRpc orig, BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_LateUpdate(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_LateUpdate(orig_LateUpdate orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_OnCollideWithPlayer(BaboonBirdAI self, Collider other); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_OnCollideWithPlayer(orig_OnCollideWithPlayer orig, BaboonBirdAI self, Collider other); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_OnCollideWithEnemy(BaboonBirdAI self, Collider other, EnemyAI enemyScript); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_OnCollideWithEnemy(orig_OnCollideWithEnemy orig, BaboonBirdAI self, Collider other, EnemyAI enemyScript); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_HitEnemy(BaboonBirdAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_HitEnemy(orig_HitEnemy orig, BaboonBirdAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_KillEnemy(BaboonBirdAI self, bool destroy); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_KillEnemy(orig_KillEnemy orig, BaboonBirdAI self, bool destroy); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StopKillAnimation(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StopKillAnimation(orig_StopKillAnimation orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StabPlayerDeathAnimServerRpc(BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StabPlayerDeathAnimServerRpc(orig_StabPlayerDeathAnimServerRpc orig, BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StabPlayerDeathAnimClientRpc(BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StabPlayerDeathAnimClientRpc(orig_StabPlayerDeathAnimClientRpc orig, BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator orig_killPlayerAnimation(BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate IEnumerator hook_killPlayerAnimation(orig_killPlayerAnimation orig, BaboonBirdAI self, int playerObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_InteractWithScrap(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_InteractWithScrap(orig_InteractWithScrap orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate bool orig_CanGrabScrap(BaboonBirdAI self, GrabbableObject scrap); [EditorBrowsable(EditorBrowsableState.Never)] public delegate bool hook_CanGrabScrap(orig_CanGrabScrap orig, BaboonBirdAI self, GrabbableObject scrap); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DropHeldItemAndSync(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DropHeldItemAndSync(orig_DropHeldItemAndSync orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DropScrapServerRpc(BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DropScrapServerRpc(orig_DropScrapServerRpc orig, BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DropScrapClientRpc(BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DropScrapClientRpc(orig_DropScrapClientRpc orig, BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DropScrap(BaboonBirdAI self, NetworkObject item, Vector3 targetFloorPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DropScrap(orig_DropScrap orig, BaboonBirdAI self, NetworkObject item, Vector3 targetFloorPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_GrabItemAndSync(BaboonBirdAI self, NetworkObject item); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_GrabItemAndSync(orig_GrabItemAndSync orig, BaboonBirdAI self, NetworkObject item); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_GrabScrapServerRpc(BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_GrabScrapServerRpc(orig_GrabScrapServerRpc orig, BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_GrabScrapClientRpc(BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_GrabScrapClientRpc(orig_GrabScrapClientRpc orig, BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_GrabScrap(BaboonBirdAI self, NetworkObject item); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_GrabScrap(orig_GrabScrap orig, BaboonBirdAI self, NetworkObject item); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ReachedNodeInSearch(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ReachedNodeInSearch(orig_ReachedNodeInSearch orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DoAIInterval(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DoAIInterval(orig_DoAIInterval orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StopFocusingThreat(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StopFocusingThreat(orig_StopFocusingThreat orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StopFocusingThreatServerRpc(BaboonBirdAI self, bool enterScoutingMode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StopFocusingThreatServerRpc(orig_StopFocusingThreatServerRpc orig, BaboonBirdAI self, bool enterScoutingMode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StopFocusingThreatClientRpc(BaboonBirdAI self, bool enterScoutingMode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StopFocusingThreatClientRpc(orig_StopFocusingThreatClientRpc orig, BaboonBirdAI self, bool enterScoutingMode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAggressiveMode(BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAggressiveMode(orig_SetAggressiveMode orig, BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAggressiveModeServerRpc(BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAggressiveModeServerRpc(orig_SetAggressiveModeServerRpc orig, BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetAggressiveModeClientRpc(BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetAggressiveModeClientRpc(orig_SetAggressiveModeClientRpc orig, BaboonBirdAI self, int mode); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetThreatInView(BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetThreatInView(orig_SetThreatInView orig, BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetThreatInViewServerRpc(BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetThreatInViewServerRpc(orig_SetThreatInViewServerRpc orig, BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_SetThreatInViewClientRpc(BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_SetThreatInViewClientRpc(orig_SetThreatInViewClientRpc orig, BaboonBirdAI self, bool inView); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_EnemyEnterRestModeServerRpc(BaboonBirdAI self, bool sleep, bool atCamp); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_EnemyEnterRestModeServerRpc(orig_EnemyEnterRestModeServerRpc orig, BaboonBirdAI self, bool sleep, bool atCamp); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_EnemyEnterRestModeClientRpc(BaboonBirdAI self, bool sleep, bool atCamp); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_EnemyEnterRestModeClientRpc(orig_EnemyEnterRestModeClientRpc orig, BaboonBirdAI self, bool sleep, bool atCamp); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_EnemyGetUpServerRpc(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_EnemyGetUpServerRpc(orig_EnemyGetUpServerRpc orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_EnemyGetUpClientRpc(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_EnemyGetUpClientRpc(orig_EnemyGetUpClientRpc orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_OnDrawGizmos(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_OnDrawGizmos(orig_OnDrawGizmos orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DetectNoise(BaboonBirdAI self, Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot, int noiseID); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DetectNoise(orig_DetectNoise orig, BaboonBirdAI self, Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot, int noiseID); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_AnimateLooking(BaboonBirdAI self, Vector3 lookAtPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_AnimateLooking(orig_AnimateLooking orig, BaboonBirdAI self, Vector3 lookAtPosition); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_Update(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_Update(orig_Update orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float orig_GetComfortableDistanceToThreat(BaboonBirdAI self, Threat focusedThreat); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float hook_GetComfortableDistanceToThreat(orig_GetComfortableDistanceToThreat orig, BaboonBirdAI self, Threat focusedThreat); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ReactToThreat(BaboonBirdAI self, Threat closestThreat); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ReactToThreat(orig_ReactToThreat orig, BaboonBirdAI self, Threat closestThreat); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartFocusOnThreatServerRpc(BaboonBirdAI self, NetworkObjectReference netObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartFocusOnThreatServerRpc(orig_StartFocusOnThreatServerRpc orig, BaboonBirdAI self, NetworkObjectReference netObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartFocusOnThreatClientRpc(BaboonBirdAI self, NetworkObjectReference netObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartFocusOnThreatClientRpc(orig_StartFocusOnThreatClientRpc orig, BaboonBirdAI self, NetworkObjectReference netObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float orig_ReactToOtherBaboonSighted(BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate float hook_ReactToOtherBaboonSighted(orig_ReactToOtherBaboonSighted orig, BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_DoLOSCheck(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_DoLOSCheck(orig_DoLOSCheck orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_PingBaboonInterest(BaboonBirdAI self, Vector3 interestPosition, int pingImportance); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_PingBaboonInterest(orig_PingBaboonInterest orig, BaboonBirdAI self, Vector3 interestPosition, int pingImportance); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_PingBirdInterestServerRpc(BaboonBirdAI self, Vector3 lookPosition, float timeToPeek); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_PingBirdInterestServerRpc(orig_PingBirdInterestServerRpc orig, BaboonBirdAI self, Vector3 lookPosition, float timeToPeek); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_PingBirdInterestClientRpc(BaboonBirdAI self, Vector3 lookPosition, float timeToPeek); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_PingBirdInterestClientRpc(orig_PingBirdInterestClientRpc orig, BaboonBirdAI self, Vector3 lookPosition, float timeToPeek); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_JoinScoutingGroup(BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_JoinScoutingGroup(orig_JoinScoutingGroup orig, BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartScoutingGroup(BaboonBirdAI self, BaboonBirdAI firstMember, bool syncWithClients); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartScoutingGroup(orig_StartScoutingGroup orig, BaboonBirdAI self, BaboonBirdAI firstMember, bool syncWithClients); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_LeaveCurrentScoutingGroup(BaboonBirdAI self, bool sync); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_LeaveCurrentScoutingGroup(orig_LeaveCurrentScoutingGroup orig, BaboonBirdAI self, bool sync); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_LeaveScoutingGroupServerRpc(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_LeaveScoutingGroupServerRpc(orig_LeaveScoutingGroupServerRpc orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_LeaveScoutingGroupClientRpc(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_LeaveScoutingGroupClientRpc(orig_LeaveScoutingGroupClientRpc orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartScoutingGroupServerRpc(BaboonBirdAI self, NetworkObjectReference leaderNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartScoutingGroupServerRpc(orig_StartScoutingGroupServerRpc orig, BaboonBirdAI self, NetworkObjectReference leaderNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartScoutingGroupClientRpc(BaboonBirdAI self, NetworkObjectReference leaderNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartScoutingGroupClientRpc(orig_StartScoutingGroupClientRpc orig, BaboonBirdAI self, NetworkObjectReference leaderNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_JoinScoutingGroupServerRpc(BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_JoinScoutingGroupServerRpc(orig_JoinScoutingGroupServerRpc orig, BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_JoinScoutingGroupClientRpc(BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_JoinScoutingGroupClientRpc(orig_JoinScoutingGroupClientRpc orig, BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_CallToOtherBaboon(BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_CallToOtherBaboon(orig_CallToOtherBaboon orig, BaboonBirdAI self, BaboonBirdAI otherBaboon); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartMiscAnimation(BaboonBirdAI self, int anim); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartMiscAnimation(orig_StartMiscAnimation orig, BaboonBirdAI self, int anim); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartMiscAnimationServerRpc(BaboonBirdAI self, int miscAnimationId); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartMiscAnimationServerRpc(orig_StartMiscAnimationServerRpc orig, BaboonBirdAI self, int miscAnimationId); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_StartMiscAnimationClientRpc(BaboonBirdAI self, int miscAnimationId); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_StartMiscAnimationClientRpc(orig_StartMiscAnimationClientRpc orig, BaboonBirdAI self, int miscAnimationId); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_CalculateAnimationDirection(BaboonBirdAI self, float maxSpeed); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_CalculateAnimationDirection(orig_CalculateAnimationDirection orig, BaboonBirdAI self, float maxSpeed); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_ctor(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_ctor(orig_ctor orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___initializeVariables(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___initializeVariables(orig___initializeVariables orig, BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig_InitializeRPCS_BaboonBirdAI(); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook_InitializeRPCS_BaboonBirdAI(orig_InitializeRPCS_BaboonBirdAI orig); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3452382367(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3452382367(orig___rpc_handler_3452382367 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3856685904(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3856685904(orig___rpc_handler_3856685904 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_2476579270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_2476579270(orig___rpc_handler_2476579270 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3749667856(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3749667856(orig___rpc_handler_3749667856 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1418775270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1418775270(orig___rpc_handler_1418775270 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1865475504(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1865475504(orig___rpc_handler_1865475504 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_869682226(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_869682226(orig___rpc_handler_869682226 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1564051222(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1564051222(orig___rpc_handler_1564051222 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1546030380(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1546030380(orig___rpc_handler_1546030380 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3360048400(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3360048400(orig___rpc_handler_3360048400 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_443869275(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_443869275(orig___rpc_handler_443869275 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1782649174(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1782649174(orig___rpc_handler_1782649174 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3428942850(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3428942850(orig___rpc_handler_3428942850 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_2073937320(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_2073937320(orig___rpc_handler_2073937320 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1806580287(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1806580287(orig___rpc_handler_1806580287 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1567928363(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1567928363(orig___rpc_handler_1567928363 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3614203845(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3614203845(orig___rpc_handler_3614203845 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1155909339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1155909339(orig___rpc_handler_1155909339 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3933590138(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3933590138(orig___rpc_handler_3933590138 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_991811456(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_991811456(orig___rpc_handler_991811456 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1670979535(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1670979535(orig___rpc_handler_1670979535 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_2348332192(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_2348332192(orig___rpc_handler_2348332192 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_2459653399(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_2459653399(orig___rpc_handler_2459653399 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_696889160(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_696889160(orig___rpc_handler_696889160 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3367846835(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3367846835(orig___rpc_handler_3367846835 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1737299197(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1737299197(orig___rpc_handler_1737299197 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1775372234(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1775372234(orig___rpc_handler_1775372234 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1078565091(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1078565091(orig___rpc_handler_1078565091 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_1580405641(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_1580405641(orig___rpc_handler_1580405641 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void orig___rpc_handler_3995026000(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate void hook___rpc_handler_3995026000(orig___rpc_handler_3995026000 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string orig___getTypeName(BaboonBirdAI self); [EditorBrowsable(EditorBrowsableState.Never)] public delegate string hook___getTypeName(orig___getTypeName orig, BaboonBirdAI self); public static event hook_IVisibleThreat_SendSpecialBehaviour IVisibleThreat_SendSpecialBehaviour { add { HookEndpointManager.Add<hook_IVisibleThreat_SendSpecialBehaviour>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_SendSpecialBehaviour>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetThreatLevel IVisibleThreat_GetThreatLevel { add { HookEndpointManager.Add<hook_IVisibleThreat_GetThreatLevel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetThreatLevel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetInterestLevel IVisibleThreat_GetInterestLevel { add { HookEndpointManager.Add<hook_IVisibleThreat_GetInterestLevel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetInterestLevel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetThreatLookTransform IVisibleThreat_GetThreatLookTransform { add { HookEndpointManager.Add<hook_IVisibleThreat_GetThreatLookTransform>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetThreatLookTransform>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetThreatTransform IVisibleThreat_GetThreatTransform { add { HookEndpointManager.Add<hook_IVisibleThreat_GetThreatTransform>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetThreatTransform>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetThreatVelocity IVisibleThreat_GetThreatVelocity { add { HookEndpointManager.Add<hook_IVisibleThreat_GetThreatVelocity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetThreatVelocity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_IVisibleThreat_GetVisibility IVisibleThreat_GetVisibility { add { HookEndpointManager.Add<hook_IVisibleThreat_GetVisibility>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_IVisibleThreat_GetVisibility>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Start Start { add { HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SyncInitialValuesServerRpc SyncInitialValuesServerRpc { add { HookEndpointManager.Add<hook_SyncInitialValuesServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SyncInitialValuesServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SyncInitialValuesClientRpc SyncInitialValuesClientRpc { add { HookEndpointManager.Add<hook_SyncInitialValuesClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SyncInitialValuesClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_LateUpdate LateUpdate { add { HookEndpointManager.Add<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_OnCollideWithPlayer OnCollideWithPlayer { add { HookEndpointManager.Add<hook_OnCollideWithPlayer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_OnCollideWithPlayer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_OnCollideWithEnemy OnCollideWithEnemy { add { HookEndpointManager.Add<hook_OnCollideWithEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_OnCollideWithEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_HitEnemy HitEnemy { add { HookEndpointManager.Add<hook_HitEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_HitEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_KillEnemy KillEnemy { add { HookEndpointManager.Add<hook_KillEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_KillEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StopKillAnimation StopKillAnimation { add { HookEndpointManager.Add<hook_StopKillAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StopKillAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StabPlayerDeathAnimServerRpc StabPlayerDeathAnimServerRpc { add { HookEndpointManager.Add<hook_StabPlayerDeathAnimServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StabPlayerDeathAnimServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StabPlayerDeathAnimClientRpc StabPlayerDeathAnimClientRpc { add { HookEndpointManager.Add<hook_StabPlayerDeathAnimClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StabPlayerDeathAnimClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_killPlayerAnimation killPlayerAnimation { add { HookEndpointManager.Add<hook_killPlayerAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_killPlayerAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_InteractWithScrap InteractWithScrap { add { HookEndpointManager.Add<hook_InteractWithScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_InteractWithScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_CanGrabScrap CanGrabScrap { add { HookEndpointManager.Add<hook_CanGrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_CanGrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DropHeldItemAndSync DropHeldItemAndSync { add { HookEndpointManager.Add<hook_DropHeldItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DropHeldItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DropScrapServerRpc DropScrapServerRpc { add { HookEndpointManager.Add<hook_DropScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DropScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DropScrapClientRpc DropScrapClientRpc { add { HookEndpointManager.Add<hook_DropScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DropScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DropScrap DropScrap { add { HookEndpointManager.Add<hook_DropScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DropScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_GrabItemAndSync GrabItemAndSync { add { HookEndpointManager.Add<hook_GrabItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_GrabItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_GrabScrapServerRpc GrabScrapServerRpc { add { HookEndpointManager.Add<hook_GrabScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_GrabScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_GrabScrapClientRpc GrabScrapClientRpc { add { HookEndpointManager.Add<hook_GrabScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_GrabScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_GrabScrap GrabScrap { add { HookEndpointManager.Add<hook_GrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_GrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_ReachedNodeInSearch ReachedNodeInSearch { add { HookEndpointManager.Add<hook_ReachedNodeInSearch>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_ReachedNodeInSearch>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DoAIInterval DoAIInterval { add { HookEndpointManager.Add<hook_DoAIInterval>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DoAIInterval>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StopFocusingThreat StopFocusingThreat { add { HookEndpointManager.Add<hook_StopFocusingThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StopFocusingThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StopFocusingThreatServerRpc StopFocusingThreatServerRpc { add { HookEndpointManager.Add<hook_StopFocusingThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StopFocusingThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_StopFocusingThreatClientRpc StopFocusingThreatClientRpc { add { HookEndpointManager.Add<hook_StopFocusingThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_StopFocusingThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetAggressiveMode SetAggressiveMode { add { HookEndpointManager.Add<hook_SetAggressiveMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAggressiveMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetAggressiveModeServerRpc SetAggressiveModeServerRpc { add { HookEndpointManager.Add<hook_SetAggressiveModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAggressiveModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetAggressiveModeClientRpc SetAggressiveModeClientRpc { add { HookEndpointManager.Add<hook_SetAggressiveModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetAggressiveModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetThreatInView SetThreatInView { add { HookEndpointManager.Add<hook_SetThreatInView>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetThreatInView>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetThreatInViewServerRpc SetThreatInViewServerRpc { add { HookEndpointManager.Add<hook_SetThreatInViewServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetThreatInViewServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_SetThreatInViewClientRpc SetThreatInViewClientRpc { add { HookEndpointManager.Add<hook_SetThreatInViewClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_SetThreatInViewClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_EnemyEnterRestModeServerRpc EnemyEnterRestModeServerRpc { add { HookEndpointManager.Add<hook_EnemyEnterRestModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_EnemyEnterRestModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_EnemyEnterRestModeClientRpc EnemyEnterRestModeClientRpc { add { HookEndpointManager.Add<hook_EnemyEnterRestModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_EnemyEnterRestModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_EnemyGetUpServerRpc EnemyGetUpServerRpc { add { HookEndpointManager.Add<hook_EnemyGetUpServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_EnemyGetUpServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_EnemyGetUpClientRpc EnemyGetUpClientRpc { add { HookEndpointManager.Add<hook_EnemyGetUpClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_EnemyGetUpClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_OnDrawGizmos OnDrawGizmos { add { HookEndpointManager.Add<hook_OnDrawGizmos>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_OnDrawGizmos>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_DetectNoise DetectNoise { add { HookEndpointManager.Add<hook_DetectNoise>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_DetectNoise>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_AnimateLooking AnimateLooking { add { HookEndpointManager.Add<hook_AnimateLooking>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } remove { HookEndpointManager.Remove<hook_AnimateLooking>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value); } } public static event hook_Update Update { add { HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not