Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Wario Pill v1.0.7
WarioPill.dll
Decompiled a year agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EasterIsland.src; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using WarioPill.NetcodePatcher; [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("bcs4313")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Adds a suspicious looking pill that is very good for you")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+cd9e2c801759e115bb3ab98ef537ed8ed3634744")] [assembly: AssemblyProduct("WarioPill")] [assembly: AssemblyTitle("WarioPill")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WarioPill { public class EatenWarioScript : NetworkBehaviour { public Random random; public AudioSource eatenAudioSource; public PlayerControllerB eater; public float jumpBoost = 1f; public float speedBoost = 1f; public float healthBoost = 1f; public float impurity = 1f; public int durationMs = 1; private bool hasPlayedAudio = false; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { random = new Random(); if (!((Component)this).GetComponent<NetworkObject>().IsSpawned) { ((Component)this).GetComponent<NetworkObject>().Spawn(false); } applyBuffsClientRpc(((NetworkBehaviour)eater).NetworkObject.NetworkObjectId, speedBoost, jumpBoost, impurity, healthBoost, durationMs); awaitDestructionServerOnly(); eater.isHoldingObject = false; } } public void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).transform.position = ((Component)eater).transform.position; if (!hasPlayedAudio) { playConsumeClientRpc(); hasPlayedAudio = true; } } } [ClientRpc] public void playConsumeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3560148940u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3560148940u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { eatenAudioSource.Play(); } } } [ClientRpc] public void applyBuffsClientRpc(ulong uid, float _speedBoost, float _jumpBoost, float _impurity, float _healthBoost, int _durationMs) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2504414786u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _speedBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _jumpBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _impurity, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _healthBoost, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, _durationMs); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2504414786u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { applyBuffstoClient(uid, _speedBoost, _jumpBoost, _impurity, _healthBoost, _durationMs); } } } public async void applyBuffstoClient(ulong uid, float _speedBoost, float _jumpBoost, float _impurity, float _healthBoost, int _durationMs) { PlayerControllerB[] players = RoundManager.Instance.playersManager.allPlayerScripts; _ = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; foreach (PlayerControllerB player in players) { if (((NetworkBehaviour)player).NetworkObject.NetworkObjectId == uid) { Plugin.highPlayers.Add(player); player.DamagePlayer((int)((0f - _healthBoost) * 100f), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (player.health > 100) { player.health = 100; } float genericSpeed = 4.6f; float genericJumpHeight = 13f; int genericClimbSpeed = 3; player.drunkness = _impurity; player.movementSpeed = genericSpeed * _speedBoost; player.jumpForce = genericJumpHeight * _jumpBoost; player.climbSpeed = (float)genericClimbSpeed * _speedBoost * _jumpBoost; await Task.Delay(_durationMs); player.movementSpeed = genericSpeed; player.jumpForce = genericJumpHeight; player.climbSpeed = genericClimbSpeed; if (player.health > 100) { player.health = 100; } Plugin.highPlayers.Remove(player); } } } public async void awaitDestructionServerOnly() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { await Task.Delay(durationMs); await Task.Delay(5000); ((NetworkBehaviour)this).NetworkObject.Despawn(true); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_EatenWarioScript() { //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 NetworkManager.__rpc_func_table.Add(3560148940u, new RpcReceiveHandler(__rpc_handler_3560148940)); NetworkManager.__rpc_func_table.Add(2504414786u, new RpcReceiveHandler(__rpc_handler_2504414786)); } private static void __rpc_handler_3560148940(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((EatenWarioScript)(object)target).playConsumeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2504414786(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num, default(ForPrimitives)); float num2 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num2, default(ForPrimitives)); float num3 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num3, default(ForPrimitives)); float num4 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num4, default(ForPrimitives)); int num5 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num5); target.__rpc_exec_stage = (__RpcExecStage)2; ((EatenWarioScript)(object)target).applyBuffsClientRpc(uid, num, num2, num3, num4, num5); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EatenWarioScript"; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("WarioPill", "Wario Pill", "1.0.0")] public class Plugin : BaseUnityPlugin { public static Harmony _harmony; public static ManualLogSource Logger; public static AssetBundle warioBundle; public static GameObject WarioPrefab; public static TerminalNode WarioItemNode; public static Item WarioPillItem; public static GameObject EatenWarioPrefab; internal static InputMap controls; public static List<PlayerControllerB> highPlayers = new List<PlayerControllerB>(); public static ConfigEntry<int> warioCost; public static ConfigEntry<float> nightfallChance; public void LogIfDebugBuild(string text) { Logger.LogInfo((object)text); } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; PopulateAssets(); bindVars(); 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); } } } WarioPillItem = warioBundle.LoadAsset<Item>("WarioItemDef"); WarioPrefab = warioBundle.LoadAsset<GameObject>("WarioPillItem"); WarioItemNode = warioBundle.LoadAsset<TerminalNode>("WarioPillItemTN"); EatenWarioPrefab = warioBundle.LoadAsset<GameObject>("EatenWario"); Debug.Log((object)("Wario Item Prefab: " + (object)WarioPrefab)); Debug.Log((object)("Wario Item Node: " + (object)WarioItemNode)); Debug.Log((object)("Wario Item Def: " + (object)WarioPillItem)); Random.InitState((int)DateTime.Now.Ticks); NetworkPrefabs.RegisterNetworkPrefab(WarioPrefab); NetworkPrefabs.RegisterNetworkPrefab(EatenWarioPrefab); Items.RegisterShopItem(WarioPillItem, (TerminalNode)null, (TerminalNode)null, WarioItemNode, warioCost.Value); controls = new InputMap(); } public void bindVars() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_004d: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown warioCost = ((BaseUnityPlugin)this).Config.Bind<int>("Global", "Wario Pill Cost", 15, "Cost to buy the pill."); ConfigEntry<int> obj = warioCost; IntInputFieldOptions val = new IntInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions<int>)val).Min = 0; ((BaseRangeOptions<int>)val).Max = 100000000; IntInputFieldConfigItem val2 = new IntInputFieldConfigItem(obj, val); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); } public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); warioBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "wariopill")); Debug.Log((object)("Wario Pill Bundle::: " + (object)warioBundle)); } } public class WarioScript : NetworkBehaviour { public Random random; public AudioClip[] warioDropSounds; public AudioClip[] warioPickupSounds; public AudioClip consumeSound; public AudioSource eatenAudioSource; public GrabbableObject wario; public bool held = true; public ScanNodeProperties scan; private float rarity; public float jumpBoost; public float speedBoost; public float healthBoost; public float impurity; public int durationMs; private readonly (float threshold, float probability)[] rarityProbabilities = new(float, float)[6] { (1f, 0.35f), (2f, 0.25f), (3f, 0.18f), (4f, 0.12f), (6f, 0.07f), (10f, 0.03f) }; public void Start() { try { random = new Random(); if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } rarity = GenerateRarity(); List<string> list = new List<string> { "Jump", "Speed", "Health" }; float num = 1f; int num2 = 1; while (random.NextDouble() < (double)num && list.Count > 0) { string text = list[random.Next(0, list.Count)]; list.Remove(text); if (text.Equals("Jump")) { jumpBoost = (float)((random.NextDouble() * 0.2 + 0.05) * (double)rarity + 1.0); } if (text.Equals("Health")) { healthBoost = (float)(random.NextDouble() * 0.25 * (double)rarity); } if (text.Equals("Speed")) { speedBoost = (float)((random.NextDouble() * 0.5 + 0.1) * (double)rarity + 1.0); } num = Math.Max(0.1f, 0.5f * rarity / (float)num2); num2++; } durationMs = (int)((float)random.Next(1000, (int)(800f * rarity + 4000f)) * rarity); impurity = (float)Math.Max(0.0, 1.0 - random.NextDouble() * random.NextDouble() * (double)rarity); setWarioStatsClientRpc(speedBoost, healthBoost, jumpBoost, durationMs, impurity, rarity); } catch (Exception ex) { Debug.Log((object)ex); } } [ClientRpc] public void setWarioStatsClientRpc(float _speedBoost, float _healthboost, float _jumpboost, int _durationMs, float _impurity, float _rarity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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) 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(3571248796u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _speedBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _healthboost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _jumpboost, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, _durationMs); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _impurity, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref _rarity, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3571248796u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { rarity = _rarity; impurity = _impurity; durationMs = _durationMs; jumpBoost = _jumpboost; healthBoost = _healthboost; speedBoost = _speedBoost; if (rarity >= 10f) { scan.headerText = "Wario Pill (Mythical)"; } else if (rarity >= 6f) { scan.headerText = "Wario Pill (Legendary)"; } else if (rarity >= 4f) { scan.headerText = "Wario Pill (Epic)"; } else if (rarity >= 3f) { scan.headerText = "Wario Pill (Rare)"; } else if (rarity >= 2f) { scan.headerText = "Wario Pill (Uncommon)"; } else { scan.headerText = "Wario Pill (Common)"; } } } private float GenerateRarity() { float num = (float)random.NextDouble(); float num2 = 0f; (float, float)[] array = rarityProbabilities; for (int i = 0; i < array.Length; i++) { (float, float) tuple = array[i]; float item = tuple.Item1; float item2 = tuple.Item2; num2 += item2; if (num < num2) { return item; } } return 1f; } public void Update() { if (!wario.isHeld || (wario.isHeld && wario.isPocketed)) { if (held && ((NetworkBehaviour)RoundManager.Instance).IsHost) { changeDropAndPickupSFX(); } held = false; } else { held = true; } if (Plugin.controls.InspectWario.triggered && wario.isHeld && !wario.isPocketed && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { showItemStats(); } if (wario.isBeingUsed && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { wario.isBeingUsed = false; eatWario(); } else { wario.isBeingUsed = false; eatWarioServerRpc(); } } } public void DropHeldItem(bool itemsFall = true, bool disconnecting = false) { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB playerHeldBy = wario.playerHeldBy; if ((Object)(object)wario == (Object)null || (Object)(object)wario.playerHeldBy == (Object)null || wario.playerHeldBy.ItemSlots == null) { return; } try { for (int i = 0; i < wario.playerHeldBy.ItemSlots.Length; i++) { GrabbableObject val = wario.playerHeldBy.ItemSlots[i]; if (!((Object)(object)val != (Object)null) || !val.isHeld || val.isPocketed) { continue; } if (itemsFall) { val.parentObject = null; val.heldByPlayerOnServer = false; if (val.playerHeldBy.isInElevator) { ((Component)val).transform.SetParent(playerHeldBy.playersManager.elevatorTransform, true); } else { ((Component)val).transform.SetParent(playerHeldBy.playersManager.propsContainer, true); } val.playerHeldBy.SetItemInElevator(playerHeldBy.isInHangarShipRoom, playerHeldBy.isInElevator, val); val.EnablePhysics(true); val.EnableItemMeshes(true); ((Component)val).transform.localScale = val.originalScale; val.isHeld = false; val.isPocketed = false; val.startFallingPosition = ((Component)val).transform.parent.InverseTransformPoint(((Component)val).transform.position); val.FallToGround(true); val.fallTime = Random.Range(-0.3f, 0.05f); Debug.Log((object)"Wario: DiscardingItem"); val.DiscardItemOnClient(); val.playerHeldBy = null; } if (((NetworkBehaviour)this).IsOwner && !disconnecting) { ((Behaviour)HUDManager.Instance.holdingTwoHandedItem).enabled = false; ((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false; HUDManager.Instance.ClearControlTips(); playerHeldBy.activatingItem = false; } playerHeldBy.ItemSlots[i] = null; break; } Debug.Log((object)"Wario: Resetting player hand..."); playerHeldBy.isHoldingObject = false; SetSpecialGrabAnimationBool(setTrue: false, playerHeldBy.currentlyHeldObjectServer, playerHeldBy); playerHeldBy.playerBodyAnimator.SetBool("cancelHolding", true); playerHeldBy.playerBodyAnimator.SetTrigger("Throw"); playerHeldBy.activatingItem = false; playerHeldBy.currentlyHeldObjectServer = null; } catch (Exception ex) { Debug.Log((object)ex); } } private void SetSpecialGrabAnimationBool(bool setTrue, GrabbableObject currentItem, PlayerControllerB ply) { if (!((NetworkBehaviour)this).IsOwner) { return; } ply.playerBodyAnimator.SetBool("Grab", setTrue); if (string.IsNullOrEmpty(currentItem.itemProperties.grabAnim)) { return; } try { ply.playerBodyAnimator.SetBool(currentItem.itemProperties.grabAnim, setTrue); } catch (Exception) { Debug.LogError((object)("An item tried to set an animator bool which does not exist: " + currentItem.itemProperties.grabAnim)); } } public void eatWario() { activateBuffClientRpc(Plugin.highPlayers.Contains(wario.playerHeldBy)); } [ClientRpc] public void warnPlayerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2229414107u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2229414107u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && Object.op_Implicit((Object)(object)wario.playerHeldBy) && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { HUDManager.Instance.DisplayTip("OH MY GAWD", "You are already high off a Wario Pill. Wait for it to wear off!", false, false, "LC_Tip1"); wario.isBeingUsed = false; } } } [ClientRpc] public void activateBuffClientRpc(bool guard) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) 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(48468497u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref guard, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 48468497u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } PlayerControllerB playerHeldBy = wario.playerHeldBy; if (Plugin.highPlayers.Contains(wario.playerHeldBy) || guard) { HUDManager.Instance.DisplayTip("OH MY GAWD", "You are already high off a Wario Pill. Wait for it to wear off!", false, false, "LC_Tip1"); wario.isBeingUsed = false; return; } Object.Destroy((Object)(object)((Component)wario).gameObject.GetComponent<BoxCollider>()); Object.Destroy((Object)(object)((Component)wario).gameObject.GetComponent<SkinnedMeshRenderer>()); Object.Destroy((Object)(object)((Component)((Component)wario).gameObject.transform.Find("ScanNode")).GetComponent<BoxCollider>()); DropHeldItem(); Plugin.Logger.LogDebug((object)"Wario: Local Player Check..."); if (Object.op_Implicit((Object)(object)playerHeldBy) && ((NetworkBehaviour)playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Plugin.Logger.LogDebug((object)"Wario Pill: Applying Buffs..."); applyBuffsClientRpc(((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId); } else { Plugin.Logger.LogDebug((object)"Wario Pill: Applying Buffs..."); applyBuffsServerRpc(((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId); } } wario.DiscardItemOnClient(); } [ServerRpc(RequireOwnership = false)] public void applyBuffsServerRpc(ulong uid) { //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) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1463385081u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1463385081u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { applyBuffsClientRpc(uid); } } } [ClientRpc] public void applyBuffsClientRpc(ulong uid) { //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) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(602293844u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 602293844u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { eatenAudioSource.Stop(); eatenAudioSource.PlayOneShot(consumeSound); applyBuffstoClient(uid); } } } public async void applyBuffstoClient(ulong uid) { PlayerControllerB[] players = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB player in players) { if (((NetworkBehaviour)player).NetworkObject.NetworkObjectId == uid) { Plugin.highPlayers.Add(player); player.DamagePlayer((int)(healthBoost * -100f), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (player.health > 100) { player.health = 100; } float genericSpeed = 4.6f; float genericJumpHeight = 13f; int genericClimbSpeed = 3; player.drunkness = impurity; player.movementSpeed = genericSpeed * speedBoost; player.jumpForce = genericJumpHeight * jumpBoost; player.climbSpeed = (float)genericClimbSpeed * speedBoost * jumpBoost; await Task.Delay(durationMs); player.movementSpeed = genericSpeed; player.jumpForce = genericJumpHeight; player.climbSpeed = genericClimbSpeed; if (player.health > 100) { player.health = 100; } Plugin.highPlayers.Remove(player); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Demolish(); } else { destroyServerRpc(); } } } } [ServerRpc(RequireOwnership = false)] public void destroyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1395143529u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1395143529u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Demolish(); } } } public void Demolish() { Object.Destroy((Object)(object)((Component)this).gameObject); } [ServerRpc(RequireOwnership = false)] public void eatWarioServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4007658854u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4007658854u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { eatWario(); } } } public void changeDropAndPickupSFX() { setSFXClientRpc(random.Next(0, warioDropSounds.Length), random.Next(0, warioPickupSounds.Length)); } [ClientRpc] public void setSFXClientRpc(int dropIndex, int pickupIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2744972096u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, dropIndex); BytePacker.WriteValueBitPacked(val2, pickupIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2744972096u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { AudioClip dropSFX = warioDropSounds[dropIndex]; AudioClip grabSFX = warioPickupSounds[pickupIndex]; wario.itemProperties.dropSFX = dropSFX; wario.itemProperties.grabSFX = grabSFX; } } } public void showItemStats() { string text = ""; string text2 = ""; text2 = ((rarity >= 10f) ? (text2 + "Rarity: Mythical ") : ((rarity >= 6f) ? (text2 + "Rarity: Legendary ") : ((rarity >= 4f) ? (text2 + "Rarity: Epic ") : ((rarity >= 3f) ? (text2 + "Rarity: Rare ") : ((!(rarity >= 2f)) ? (text2 + "Rarity: Common ") : (text2 + "Rarity: Uncommon ")))))); text2 = text2 + "Time: " + durationMs / 1000 + "s\n"; if (speedBoost != 1f) { text = text + "Speed Boost: " + 100f * (speedBoost - 1f) + "%\n"; } if (healthBoost != 1f) { text = text + "HP Heal: " + healthBoost * 100f + "\n"; } if (jumpBoost != 1f) { text = text + "Jump Boost: " + (jumpBoost - 1f) * 100f + "%\n"; } text = text + "Purity: " + (100f - 100f * impurity) + "%\n"; HUDManager.Instance.DisplayTip(text2, text, false, false, "LC_Tip1"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_WarioScript() { //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 NetworkManager.__rpc_func_table.Add(3571248796u, new RpcReceiveHandler(__rpc_handler_3571248796)); NetworkManager.__rpc_func_table.Add(2229414107u, new RpcReceiveHandler(__rpc_handler_2229414107)); NetworkManager.__rpc_func_table.Add(48468497u, new RpcReceiveHandler(__rpc_handler_48468497)); NetworkManager.__rpc_func_table.Add(1463385081u, new RpcReceiveHandler(__rpc_handler_1463385081)); NetworkManager.__rpc_func_table.Add(602293844u, new RpcReceiveHandler(__rpc_handler_602293844)); NetworkManager.__rpc_func_table.Add(1395143529u, new RpcReceiveHandler(__rpc_handler_1395143529)); NetworkManager.__rpc_func_table.Add(4007658854u, new RpcReceiveHandler(__rpc_handler_4007658854)); NetworkManager.__rpc_func_table.Add(2744972096u, new RpcReceiveHandler(__rpc_handler_2744972096)); } private static void __rpc_handler_3571248796(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num, default(ForPrimitives)); float healthboost = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref healthboost, default(ForPrimitives)); float jumpboost = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref jumpboost, default(ForPrimitives)); int num2 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num2); float num3 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num3, default(ForPrimitives)); float num4 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num4, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((WarioScript)(object)target).setWarioStatsClientRpc(num, healthboost, jumpboost, num2, num3, num4); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2229414107(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((WarioScript)(object)target).warnPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_48468497(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool guard = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref guard, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((WarioScript)(object)target).activateBuffClientRpc(guard); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1463385081(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 uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((WarioScript)(object)target).applyBuffsServerRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_602293844(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 uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)2; ((WarioScript)(object)target).applyBuffsClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1395143529(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((WarioScript)(object)target).destroyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4007658854(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((WarioScript)(object)target).eatWarioServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2744972096(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int dropIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dropIndex); int pickupIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref pickupIndex); target.__rpc_exec_stage = (__RpcExecStage)2; ((WarioScript)(object)target).setSFXClientRpc(dropIndex, pickupIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WarioScript"; } } } namespace EasterIsland { internal class ConfigModel { public static ConfigEntry<float> moaiGlobalSize; public static ConfigEntry<float> moaiGlobalMusicVol; public static ConfigEntry<float> moaiGlobalRarity; public static ConfigEntry<float> moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry<float> obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions<float>)val).Min = 0.05f; ((BaseRangeOptions<float>)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry<float> obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val3).Min = 0f; ((BaseRangeOptions<float>)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry<float> obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val5).Min = 0f; ((BaseRangeOptions<float>)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry<float> obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val7).Min = 0f; ((BaseRangeOptions<float>)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } } namespace EasterIsland.src { internal class InputMap : LcInputActions { [InputAction(/*Could not decode attribute arguments.*/)] public InputAction InspectWario { get; set; } } } namespace WarioPill.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }