Decompiled source of KawaiKnife v0.0.3

boom boom.dll

Decompiled 2 months ago
using 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 BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using boom boom.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: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("boom boom")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("boom boom")]
[assembly: AssemblyTitle("boom boom")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
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;
		}
	}
}
namespace boom_boom
{
	public class KawaiKnife : KnifeItem
	{
		public PlayerControllerB? player1;

		public PlayerControllerB? player2;

		private bool hasBeenUsed = false;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			RoundManager.PlayRandomClip(base.knifeAudio, base.swingSFX, true, 1f, 0, 1000);
			if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null)
			{
				base.previousPlayerHeldBy = ((GrabbableObject)this).playerHeldBy;
				if (((NetworkBehaviour)((GrabbableObject)this).playerHeldBy).IsOwner)
				{
					((GrabbableObject)this).playerHeldBy.playerBodyAnimator.SetTrigger("UseHeldItem1");
				}
			}
			if (((NetworkBehaviour)this).IsOwner)
			{
				HitKnifeKawai();
			}
		}

		public override void Update()
		{
			//IL_005f: 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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).Update();
			if ((Object)(object)player1 != (Object)null && (Object)(object)player2 != (Object)null)
			{
				if (player1.isPlayerDead)
				{
					Plugin.logger.LogInfo((object)"player1 is dead");
					player2.DamagePlayer(999, true, true, (CauseOfDeath)5, 3, false, default(Vector3));
					Plugin.logger.LogInfo((object)"player2 is dead");
				}
				if (player2.isPlayerDead)
				{
					Plugin.logger.LogInfo((object)"player2 is dead");
					player1.DamagePlayer(999, true, true, (CauseOfDeath)5, 3, false, default(Vector3));
					Plugin.logger.LogInfo((object)"player1 is dead");
				}
				if (player1.isPlayerDead && player2.isPlayerDead)
				{
					Plugin.logger.LogInfo((object)"Both players are dead, resetting players.");
					player1 = null;
					player2 = null;
				}
			}
		}

		public void HitKnifeKawai(bool cancel = false)
		{
			//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_0097: 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_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_050c: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: 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)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: 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_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: 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_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.previousPlayerHeldBy == (Object)null)
			{
				Debug.LogError((object)"Previousplayerheldby is null on this client when HitShovel is called.");
				return;
			}
			base.previousPlayerHeldBy.activatingItem = false;
			bool flag = false;
			bool flag2 = false;
			int num = -1;
			bool flag3 = false;
			if (!cancel && Time.realtimeSinceStartup - base.timeAtLastDamageDealt > 0.43f)
			{
				base.previousPlayerHeldBy.twoHanded = false;
				base.objectsHitByKnife = Physics.SphereCastAll(((Component)base.previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)base.previousPlayerHeldBy.gameplayCamera).transform.right * 0.1f, 0.3f, ((Component)base.previousPlayerHeldBy.gameplayCamera).transform.forward, 0.75f, base.knifeMask, (QueryTriggerInteraction)2);
				base.objectsHitByKnifeList = base.objectsHitByKnife.OrderBy(delegate(RaycastHit x)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					//IL_0001: Unknown result type (might be due to invalid IL or missing references)
					RaycastHit val5 = x;
					return ((RaycastHit)(ref val5)).distance;
				}).ToList();
				List<EnemyAI> list = new List<EnemyAI>();
				RaycastHit val = default(RaycastHit);
				IHittable val4 = default(IHittable);
				for (int i = 0; i < base.objectsHitByKnifeList.Count; i++)
				{
					RaycastHit val2 = base.objectsHitByKnifeList[i];
					RaycastHit val3 = val2;
					if (((Component)((RaycastHit)(ref val3)).transform).gameObject.layer != 8)
					{
						val2 = base.objectsHitByKnifeList[i];
						val3 = val2;
						if (((Component)((RaycastHit)(ref val3)).transform).gameObject.layer != 11)
						{
							val2 = base.objectsHitByKnifeList[i];
							val3 = val2;
							if (!((Component)((RaycastHit)(ref val3)).transform).TryGetComponent<IHittable>(ref val4))
							{
								continue;
							}
							val2 = base.objectsHitByKnifeList[i];
							val3 = val2;
							if ((Object)(object)((RaycastHit)(ref val3)).transform == (Object)(object)((Component)base.previousPlayerHeldBy).transform)
							{
								continue;
							}
							val2 = base.objectsHitByKnifeList[i];
							val3 = val2;
							if (!(((RaycastHit)(ref val3)).point == Vector3.zero))
							{
								Vector3 position = ((Component)base.previousPlayerHeldBy.gameplayCamera).transform.position;
								val2 = base.objectsHitByKnifeList[i];
								val3 = val2;
								if (Physics.Linecast(position, ((RaycastHit)(ref val3)).point, ref val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))
								{
									continue;
								}
							}
							flag = true;
							Vector3 forward = ((Component)base.previousPlayerHeldBy.gameplayCamera).transform.forward;
							try
							{
								val2 = base.objectsHitByKnifeList[i];
								val3 = val2;
								EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val3)).transform).GetComponent<EnemyAICollisionDetect>();
								if ((Object)(object)component != (Object)null)
								{
									if ((Object)(object)component.mainScript == (Object)null || list.Contains(component.mainScript))
									{
										continue;
									}
									goto IL_0347;
								}
								val2 = base.objectsHitByKnifeList[i];
								val3 = val2;
								PlayerControllerB component2 = ((Component)((RaycastHit)(ref val3)).transform).GetComponent<PlayerControllerB>();
								if (!((Object)(object)component2 != (Object)null))
								{
									goto IL_0347;
								}
								player1 = component2;
								HitKawaiKnifeServerRpc(component2.playerClientId, IsPlayer1: true);
								if (!flag3)
								{
									flag3 = true;
									goto IL_0347;
								}
								goto end_IL_0286;
								IL_0347:
								bool flag4 = val4.Hit(base.knifeHitForce, forward, base.previousPlayerHeldBy, true, 5);
								if (flag4 && (Object)(object)component != (Object)null)
								{
									list.Add(component.mainScript);
								}
								if (!flag2 && flag4)
								{
									flag2 = true;
									base.timeAtLastDamageDealt = Time.realtimeSinceStartup;
									base.bloodParticle.Play(true);
								}
								end_IL_0286:;
							}
							catch (Exception arg)
							{
								Debug.Log((object)$"Exception caught when hitting object with shovel from player #{base.previousPlayerHeldBy.playerClientId}: {arg}");
							}
							continue;
						}
					}
					flag = true;
					val2 = base.objectsHitByKnifeList[i];
					val3 = val2;
					string tag = ((Component)((RaycastHit)(ref val3)).collider).gameObject.tag;
					for (int j = 0; j < StartOfRound.Instance.footstepSurfaces.Length; j++)
					{
						if (StartOfRound.Instance.footstepSurfaces[j].surfaceTag == tag)
						{
							num = j;
							break;
						}
					}
				}
				if ((Object)(object)player1 != (Object)null)
				{
					player2 = base.previousPlayerHeldBy;
					HitKawaiKnifeServerRpc(base.previousPlayerHeldBy.playerClientId, IsPlayer1: false);
					Plugin.logger.LogInfo((object)("Player 1: " + player1.playerUsername + ", Player 2: " + player2.playerUsername));
				}
			}
			if (flag)
			{
				RoundManager.PlayRandomClip(base.knifeAudio, base.hitSFX, true, 1f, 0, 1000);
				Object.FindObjectOfType<RoundManager>().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0);
				if (!flag2 && num != -1)
				{
					base.knifeAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX);
					WalkieTalkie.TransmitOneShotAudio(base.knifeAudio, StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX, 1f);
				}
				((KnifeItem)this).HitShovelServerRpc(num);
			}
			if ((Object)(object)player1 != (Object)null && (Object)(object)player2 != (Object)null)
			{
				Plugin.logger.LogInfo((object)("Both players are set! Player 1: " + player1.playerUsername + ", Player 2: " + player2.playerUsername));
				SetInvisibleKawaiKnifeServerRpc();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void HitKawaiKnifeServerRpc(ulong playerId, bool IsPlayer1)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2102318198u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref IsPlayer1, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2102318198u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
					HitKawaiKnifeClientRpc(playerId, IsPlayer1);
				}
			}
		}

		[ClientRpc]
		public void HitKawaiKnifeClientRpc(ulong playerId, bool IsPlayer1)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2406350173u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref IsPlayer1, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2406350173u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
				Plugin.logger.LogInfo((object)$"HitKawaiKnifeClientRpc called with playerId: {playerId}, IsPlayer1: {IsPlayer1}");
				if (IsPlayer1)
				{
					player1 = StartOfRound.Instance.allPlayerScripts[playerId];
				}
				else
				{
					player2 = StartOfRound.Instance.allPlayerScripts[playerId];
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetInvisibleKawaiKnifeServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(665359969u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 665359969u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
					SetInvisibleKawaiKnifeClientRpc();
				}
			}
		}

		[ClientRpc]
		public void SetInvisibleKawaiKnifeClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(361356508u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 361356508u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
					Plugin.logger.LogInfo((object)"Setting Kawai Knife invisible");
					base.previousPlayerHeldBy.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true);
					((GrabbableObject)this).EnableItemMeshes(false);
					((GrabbableObject)this).grabbable = false;
					((GrabbableObject)this).grabbableToEnemies = false;
					((GrabbableObject)this).playerHeldBy = null;
				}
			}
		}

		protected override void __initializeVariables()
		{
			((KnifeItem)this).__initializeVariables();
		}

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(2102318198u, new RpcReceiveHandler(__rpc_handler_2102318198), "HitKawaiKnifeServerRpc");
			((NetworkBehaviour)this).__registerRpc(2406350173u, new RpcReceiveHandler(__rpc_handler_2406350173), "HitKawaiKnifeClientRpc");
			((NetworkBehaviour)this).__registerRpc(665359969u, new RpcReceiveHandler(__rpc_handler_665359969), "SetInvisibleKawaiKnifeServerRpc");
			((NetworkBehaviour)this).__registerRpc(361356508u, new RpcReceiveHandler(__rpc_handler_361356508), "SetInvisibleKawaiKnifeClientRpc");
			((KnifeItem)this).__initializeRpcs();
		}

		private static void __rpc_handler_2102318198(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_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				bool isPlayer = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isPlayer, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((KawaiKnife)(object)target).HitKawaiKnifeServerRpc(playerId, isPlayer);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2406350173(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_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				bool isPlayer = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isPlayer, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((KawaiKnife)(object)target).HitKawaiKnifeClientRpc(playerId, isPlayer);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_665359969(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;
				((KawaiKnife)(object)target).SetInvisibleKawaiKnifeServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_361356508(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;
				((KawaiKnife)(object)target).SetInvisibleKawaiKnifeClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string? __getTypeName()
		{
			return "KawaiKnife";
		}
	}
	[BepInPlugin("abi.boomboom", "Boom Boom", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin instance;

		public static ManualLogSource logger;

		public Item KawaiKnife;

		public void Awake()
		{
			instance = this;
			logger = ((BaseUnityPlugin)this).Logger;
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "boom boom");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			KawaiKnife = val.LoadAsset<Item>("Assets/LethalCompany/Mods/boomboom/Knife_01/kawai knife.asset");
			NetworkPrefabs.RegisterNetworkPrefab(KawaiKnife.spawnPrefab);
			Items.RegisterScrap(KawaiKnife, 20, (LevelTypes)(-1));
			logger.LogInfo((object)"Boom Boom loaded!");
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
namespace __GEN
{
	internal class NetworkVariableSerializationHelper
	{
		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeSerialization()
		{
		}
	}
}
namespace boom boom.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}