Decompiled source of FishAimbotUnified v5.1.0

AimbotRevised.dll

Decompiled 17 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using FishNet.Connection;
using FishNet.Object;
using FishNet.Object.Synchronizing;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Steamworks;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AimbotRevised")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+c06467c114f136a0d0f9eb456ffd0b7ce2bc3248")]
[assembly: AssemblyProduct("AimbotRevised")]
[assembly: AssemblyTitle("AimbotRevised")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 FishAimbotMod
{
	[HarmonyPatch(typeof(PlayerCamera), "ApplyAimAssist")]
	internal static class AimAssistPatch
	{
		private static readonly FieldRef<PlayerCamera, Vector3> Rotation = AccessTools.FieldRefAccess<PlayerCamera, Vector3>("_rot");

		private static void Postfix(PlayerCamera __instance)
		{
			//IL_0023: 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)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_0073: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_009a: 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_00c8: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.AimEnabled && Input.GetKey((KeyCode)324))
			{
				Transform camTransform = __instance.CamTransform;
				AimTarget aimTarget = Targeting.FindBest(camTransform.position, camTransform.forward, 180f);
				if (aimTarget.IsValid)
				{
					Settings.CurrentTarget = aimTarget;
					Settings.TargetId = aimTarget.Id;
					Vector3 val = (Settings.LastTargetPoint = Targeting.GetAimPoint(aimTarget, camTransform.position, camTransform.forward)) - camTransform.position;
					Vector3 normalized = ((Vector3)(ref val)).normalized;
					Vector3 val2 = Rotation.Invoke(__instance);
					val2.x = Mathf.Clamp((0f - Mathf.Asin(normalized.y)) * 57.29578f, -90f, 90f);
					val2.y = Mathf.Atan2(normalized.x, normalized.z) * 57.29578f;
					Rotation.Invoke(__instance) = val2;
				}
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "Update")]
	internal static class WeaponAutoShootPatch
	{
		private static readonly FieldRef<Weapon, bool> HasCoolDownRef = AccessTools.FieldRefAccess<Weapon, bool>("_hasCoolDown");

		private static readonly FieldRef<Weapon, bool> IsReloadingRef = AccessTools.FieldRefAccess<Weapon, bool>("_isReloading");

		private static readonly MethodInfo ShootMethod = AccessTools.Method(typeof(Weapon), "Shoot", (Type[])null, (Type[])null);

		private static readonly FieldRef<Weapon, bool> HoldingFireInputRef = AccessTools.FieldRefAccess<Weapon, bool>("_holdingFireInput");

		private static readonly FieldRef<Weapon, bool> QueuedShootRef = AccessTools.FieldRefAccess<Weapon, bool>("_queuedShoot");

		private static void Postfix(Weapon __instance)
		{
			//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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.AutoShootEnabled || !Object.op_Implicit((Object)(object)__instance) || !Object.op_Implicit((Object)(object)((Item)__instance).Holder) || !((NetworkBehaviour)((Item)__instance).Holder).Owner.IsLocalClient || __instance.Ammo <= 0 || IsReloadingRef.Invoke(__instance) || (!Settings.FastShoot && HasCoolDownRef.Invoke(__instance)))
			{
				return;
			}
			Player holder = ((Item)__instance).Holder;
			Transform val = (Object.op_Implicit((Object)(object)holder.Camera) ? holder.Camera.CamTransform : holder.CamObject);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return;
			}
			Vector3 position = val.position;
			Vector3 forward = val.forward;
			AimTarget aimTarget = Settings.CurrentTarget;
			if (!aimTarget.IsValid)
			{
				aimTarget = Targeting.FindBest(position, forward, 75f);
				if (!aimTarget.IsValid)
				{
					aimTarget = Targeting.FindBest(position, forward, 180f);
				}
			}
			if (!aimTarget.IsValid)
			{
				return;
			}
			Vector3 aimPoint = Targeting.GetAimPoint(aimTarget, position, forward);
			if (aimPoint == Vector3.zero)
			{
				return;
			}
			Vector3 val2 = aimPoint - position;
			float magnitude = ((Vector3)(ref val2)).magnitude;
			if (magnitude < 0.1f)
			{
				return;
			}
			LayerMask val3 = LayerMask.op_Implicit(LayerMask.op_Implicit(GameInfo.LevelLayer) | LayerMask.op_Implicit(GameInfo.BoatLayer));
			if (Physics.Raycast(position, ((Vector3)(ref val2)).normalized, magnitude - 0.15f, LayerMask.op_Implicit(val3)))
			{
				return;
			}
			try
			{
				HoldingFireInputRef.Invoke(__instance) = true;
				QueuedShootRef.Invoke(__instance) = true;
				ShootMethod.Invoke(__instance, null);
				Settings.CurrentTarget = aimTarget;
				Settings.LastTargetPoint = aimPoint;
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[AUTO-SHOOT] 自动开枪异常: " + ex.Message);
			}
		}
	}
	internal static class Tracking
	{
		internal static bool TryRedirect(Vector3 position, Vector3 velocity, out Vector3 redirected)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: 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_003d: 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_009b: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_0043: 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_00a0: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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)
			redirected = velocity;
			if (!Settings.IsUsable || !Settings.BulletTrackingEnabled)
			{
				return false;
			}
			AimTarget aimTarget = Settings.CurrentTarget;
			if (!aimTarget.IsValid)
			{
				Vector3 lookDirection = ((((Vector3)(ref velocity)).sqrMagnitude > 0.001f) ? ((Vector3)(ref velocity)).normalized : Vector3.forward);
				aimTarget = Targeting.FindBest(position, lookDirection, 180f);
				if (!aimTarget.IsValid)
				{
					aimTarget = Targeting.FindBest(position, lookDirection, 360f);
				}
			}
			if (!aimTarget.IsValid)
			{
				return false;
			}
			AimTarget target = aimTarget;
			Vector3 normalized;
			if (!(((Vector3)(ref velocity)).sqrMagnitude > 0.0001f))
			{
				Vector3 val = aimTarget.RootPosition - position;
				normalized = ((Vector3)(ref val)).normalized;
			}
			else
			{
				normalized = ((Vector3)(ref velocity)).normalized;
			}
			Vector3 aimPoint = Targeting.GetAimPoint(target, position, normalized);
			Vector3 val2 = aimPoint - position;
			if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f)
			{
				return false;
			}
			redirected = ((Vector3)(ref val2)).normalized * ((Vector3)(ref velocity)).magnitude;
			Settings.LastTargetPoint = aimPoint;
			Settings.CurrentTarget = aimTarget;
			return true;
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectile")]
	internal static class AddProjectileTrackingPatch
	{
		private static void Prefix(bool isLocal, Vector3 pos, ref Vector3 velocity)
		{
			//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_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: 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_0039: 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_0048: 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_001b: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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)
			Vector3 original = velocity;
			if (isLocal)
			{
				Vector3 end;
				if (Tracking.TryRedirect(pos, velocity, out var redirected))
				{
					velocity = redirected;
					end = Settings.LastTargetPoint;
					Settings.RecordRedirect("单发/即时命中", pos, original, redirected);
				}
				else
				{
					end = pos + ((Vector3)(ref original)).normalized * 120f;
				}
				NeonTracerManager.SpawnTracer(pos, end);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectiles")]
	internal static class AddProjectilesTrackingPatch
	{
		private static void Prefix(bool isLocal, Vector3 pos, Vector3[] velocities)
		{
			//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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			if (!isLocal || velocities == null)
			{
				return;
			}
			for (int i = 0; i < velocities.Length; i++)
			{
				Vector3 original = velocities[i];
				Vector3 end;
				if (Tracking.TryRedirect(pos, velocities[i], out var redirected))
				{
					velocities[i] = redirected;
					end = Settings.LastTargetPoint;
					Settings.RecordRedirect("多发/即时命中", pos, original, redirected);
				}
				else
				{
					end = pos + ((Vector3)(ref original)).normalized * 120f;
				}
				NeonTracerManager.SpawnTracer(pos, end);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "UpdateProjectilePos")]
	internal static class BulletTrackingPatch
	{
		private static void Prefix(Projectile projectile)
		{
			//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_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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)
			//IL_002a: 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_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			if (projectile != null && projectile.IsLocal)
			{
				Vector3 velocity = projectile.Velocity;
				if (Tracking.TryRedirect(projectile.Position, projectile.Velocity, out var redirected))
				{
					projectile.Velocity = redirected;
					Settings.RecordRedirect("飞行中", projectile.Position, velocity, redirected);
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "Hit")]
	internal static class ExplosiveBulletsHitPatch
	{
		private static void Postfix(Projectile projectile, ProjectileType type, RaycastHit hit)
		{
			//IL_0052: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_00e6: 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)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.ExplosiveBullets || projectile == null || !projectile.IsLocal)
			{
				return;
			}
			Vector3 point = ((RaycastHit)(ref hit)).point;
			try
			{
				BossManager.BossExplosion(point, false);
				AudioManager.PlayClipAt("Explosion", point, false, (AudioDistance)3, 1.2f, 0.1f);
			}
			catch
			{
			}
			try
			{
				float num = 8.5f;
				int num2 = 150;
				Collider[] array = Physics.OverlapSphere(point, num);
				if (array == null)
				{
					return;
				}
				List<Creature> list = new List<Creature>();
				Collider[] array2 = array;
				foreach (Collider val in array2)
				{
					if (!Object.op_Implicit((Object)(object)val))
					{
						continue;
					}
					Item val2 = ItemManager.Get(val);
					if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.Creature) && !val2.Creature.IsDead && !list.Contains(val2.Creature))
					{
						list.Add(val2.Creature);
						Vector3 val3 = ((Component)val2).transform.position - point;
						Vector3 normalized = ((Vector3)(ref val3)).normalized;
						val2.Creature.ServerChangeHp(num2);
						if (Object.op_Implicit((Object)(object)val2.Rig))
						{
							val2.Rig.AddForce((normalized + Vector3.up * 0.5f) * 30f, (ForceMode)1);
						}
					}
				}
			}
			catch
			{
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "HasCooldown")]
	internal static class FastShootPatch
	{
		private static bool Prefix(Weapon __instance, ref bool __result)
		{
			if (!Settings.IsUsable || !Settings.FastShoot || !Object.op_Implicit((Object)(object)__instance))
			{
				return true;
			}
			if (!Object.op_Implicit((Object)(object)((Item)__instance).Holder) || !((NetworkBehaviour)((Item)__instance).Holder).Owner.IsLocalClient)
			{
				return true;
			}
			__result = false;
			return false;
		}
	}
	internal static class InventoryExpander
	{
		private static readonly FieldRef<PlayerInventory, List<InventorySlot>> ItemSlotsRef = AccessTools.FieldRefAccess<PlayerInventory, List<InventorySlot>>("_itemSlots");

		private static readonly MethodInfo UpdateInventoryCameraMethod = AccessTools.Method(typeof(PlayerInventory), "UpdateInventoryCamera", (Type[])null, (Type[])null);

		internal static void UnlockMaxSlots()
		{
			if (!Object.op_Implicit((Object)(object)Player.LocalPlayer) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Inventory))
			{
				return;
			}
			PlayerInventory inventory = Player.LocalPlayer.Inventory;
			try
			{
				inventory.UnlockExtraPocket((byte)2);
				inventory._extraSlots.Value = 2;
				List<InventorySlot> list = ItemSlotsRef.Invoke(inventory);
				if (list != null)
				{
					int num = Mathf.Clamp(3 + inventory._extraSlots.Value, 0, list.Count);
					for (int i = 0; i < list.Count; i++)
					{
						if ((Object)(object)list[i] != (Object)null)
						{
							list[i].Initialize(i < num);
						}
					}
				}
				if (UpdateInventoryCameraMethod != null)
				{
					UpdateInventoryCameraMethod.Invoke(inventory, null);
				}
				inventory.LocalTrySelectSlot(0);
				Plugin.WriteLog("[INVENTORY] 已成功激活全部 5 个物品栏 (1~5号槽位全部可用)");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[INVENTORY] 解锁背包异常: " + ex.Message);
			}
		}
	}
	internal static class ItemSpawnerUtility
	{
		internal class SpawnItemEntry
		{
			public string RawKey;

			public string DisplayName;

			public Item Prefab;
		}

		internal enum SpawnerCategory
		{
			Weapons,
			Bosses,
			Creatures,
			Supplies
		}

		private static readonly Dictionary<string, string> ChineseNames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
		{
			{ "assault rifle", "突击步枪 (AR)" },
			{ "pistol", "手枪 (Pistol)" },
			{ "shotgun", "霰弹枪 (Shotgun)" },
			{ "smg", "微型冲锋枪 (SMG)" },
			{ "sniper rifle", "重型狙击枪" },
			{ "knife", "军用匕首" },
			{ "brass knuckles", "近战指虎" },
			{ "fishing rod", "普通钓鱼竿" },
			{ "crab fishing rod", "专业捕蟹竿" },
			{ "dynamite", "烈性炸药 / 雷管" },
			{ "beer", "冰镇啤酒" },
			{ "badball", "弹力球" },
			{ "disc", "复古黑胶唱片" },
			{ "map", "航海地图" },
			{ "radio", "无线电收音机" },
			{ "albatross", "巨型信天翁 (Boss)" },
			{ "blue shark", "远洋蓝鲨 (Boss)" },
			{ "bowhead whale", "巨型弓头鲸 (Boss)" },
			{ "giant piranha", "史前巨型食人鱼 (Boss)" },
			{ "goblin shark", "深海哥布林鲨 (Boss)" },
			{ "mutated bowhead whale", "辐射变异弓头鲸 (Boss)" },
			{ "pufferfish", "狂暴巨型河豚 (Boss)" },
			{ "spidercrab", "深渊巨型蜘蛛蟹 (Boss)" },
			{ "sunfish", "巨型翻车鱼 (Boss)" },
			{ "the old pike", "远古白斑巨狗鱼 (Boss)" },
			{ "tuna", "巨型蓝鳍金枪鱼 (Boss)" },
			{ "seagull", "海鸥" },
			{ "salmon", "大西洋三文鱼" },
			{ "piranha", "热带食人鱼" },
			{ "catfish", "淡水鲶鱼" },
			{ "clownfish", "小丑鱼" },
			{ "eel", "深海电鳗" },
			{ "flying fish", "飞鱼" },
			{ "goldfish", "观赏金鱼" },
			{ "lobster", "澳洲大龙虾" },
			{ "rockcrab", "岩石蟹" },
			{ "browncrab", "棕色面包蟹" },
			{ "seahorse", "海马" },
			{ "shrimp", "对虾" },
			{ "clam", "巨蚌 / 珍珠贝" },
			{ "anglerfish", "深海鮟鱇鱼" },
			{ "blobfish", "忧郁水滴鱼" },
			{ "mackerel", "青花鱼 / 鲭鱼" },
			{ "halibut", "太平洋大比目鱼" },
			{ "needlefish", "尖嘴针鱼" },
			{ "oarfish", "皇带鱼 (地震鱼)" },
			{ "parrotfish", "彩虹鹦嘴鱼" },
			{ "perch", "黄金河鲈" },
			{ "pike", "白斑狗鱼" },
			{ "red snapper", "真红鲷鱼" },
			{ "stonefish", "剧毒石头鱼" },
			{ "tigerfish", "凶猛虎鱼" },
			{ "triggerfish", "热带鳞鲀" },
			{ "sea urchin", "黑海胆" },
			{ "dripper", "潮牌滴水兽" },
			{ "bingbong", "冰棒企鹅鱼" },
			{ "voxel fish", "像素体素鱼" },
			{ "footsnail", "大足海蜗牛" },
			{ "goby", "花纹虾虎鱼" },
			{ "gar", "远古雀鳝" },
			{ "leech", "吸血水蛭" },
			{ "angelfish", "热带神仙鱼" },
			{ "bass", "大口黑鲈" },
			{ "bluegill", "蓝鳃太阳鱼" },
			{ "bowlfish", "圆碗鱼" },
			{ "cod", "大西洋真鳕鱼" },
			{ "superdwarf fish", "超级侏儒鱼" },
			{ "yellow boxfish", "黄木瓜箱鲀" },
			{ "albatrossmeat", "烤信天翁肉" },
			{ "crabmeat", "新鲜蟹肉" },
			{ "piranhameat", "食人鱼肉" },
			{ "pufferfishmeat", "河豚肉" },
			{ "whalemeat", "上等鲸鱼肉" },
			{ "albatross head", "信天翁头标本" },
			{ "giantpiranhaskeleton", "巨型食人鱼骨标本" },
			{ "pufferfish fin", "河豚鱼鳍标本" },
			{ "spidercrab shell", "蜘蛛蟹外壳标本" },
			{ "whale fin", "鲸鱼尾鳍标本" }
		};

		internal static SpawnerCategory CurrentCategory = SpawnerCategory.Weapons;

		internal static readonly List<SpawnItemEntry> WeaponsList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> BossesList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> CreaturesList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> SuppliesList = new List<SpawnItemEntry>();

		internal static bool CacheBuilt = false;

		internal static int SelectedWeaponIdx = 0;

		internal static int SelectedBossIdx = 0;

		internal static int SelectedCreatureIdx = 0;

		internal static int SelectedSupplyIdx = 0;

		internal static int SelectedSightType = 0;

		internal static int SelectedBarrelType = 0;

		internal static int SelectedDamageLevel = 0;

		internal static bool SelectedExtMag = true;

		internal static bool SelectedLaser = true;

		internal static bool SpawnDrip = false;

		internal static bool SpawnDead = false;

		internal static string GetDisplayName(Item item)
		{
			if (!Object.op_Implicit((Object)(object)item))
			{
				return "未知物品";
			}
			try
			{
				string name = item.GetName();
				if (!string.IsNullOrEmpty(name) && !name.StartsWith("#") && name != ((Object)item).name)
				{
					return name;
				}
			}
			catch
			{
			}
			if (ChineseNames.TryGetValue(((Object)item).name.Trim(), out var value))
			{
				return value;
			}
			return ((Object)item).name;
		}

		internal static void EnsureCache()
		{
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			if (CacheBuilt)
			{
				return;
			}
			CacheBuilt = true;
			Item[] array = Resources.LoadAll<Item>("Items");
			if (array == null || array.Length == 0)
			{
				return;
			}
			Item[] array2 = array;
			foreach (Item val in array2)
			{
				if (!Object.op_Implicit((Object)(object)val))
				{
					continue;
				}
				string text = ((Object)val).name.ToLower();
				Weapon obj = ((Component)val).GetComponent<Weapon>() ?? ((Component)val).GetComponentInChildren<Weapon>();
				Creature val2 = ((Component)val).GetComponent<Creature>() ?? ((Component)val).GetComponentInChildren<Creature>();
				SpawnItemEntry item = new SpawnItemEntry
				{
					RawKey = ((Object)val).name,
					DisplayName = GetDisplayName(val),
					Prefab = val
				};
				if ((Object)(object)obj != (Object)null)
				{
					WeaponsList.Add(item);
				}
				else if ((Object)(object)val2 != (Object)null && !val2.ExcludeFromJournal && !val2.IsDrip)
				{
					if ((int)val2.BossType != 0 || text.Contains("shark") || text.Contains("whale") || text.Contains("boss"))
					{
						BossesList.Add(item);
					}
					else
					{
						CreaturesList.Add(item);
					}
				}
				else
				{
					SuppliesList.Add(item);
				}
			}
			WeaponsList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			BossesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			CreaturesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			SuppliesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
		}

		internal static string SpawnItem(SpawnItemEntry entry, bool isWeapon)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: 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_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			if (entry == null || !Object.op_Implicit((Object)(object)entry.Prefab))
			{
				return "未选择有效物品";
			}
			Transform val = (Object.op_Implicit((Object)(object)GameInfo.CurCamera) ? ((Component)GameInfo.CurCamera).transform : (Object.op_Implicit((Object)(object)Player.LocalPlayer) ? Player.LocalPlayer.CamObject : null));
			Vector3 val2;
			Quaternion val3;
			if ((Object)(object)val != (Object)null)
			{
				val2 = val.position + val.forward * 2.5f;
				val3 = Quaternion.Euler(0f, val.eulerAngles.y, 0f);
			}
			else
			{
				if (!((Object)(object)Player.LocalPlayer != (Object)null) || !((Object)(object)Player.LocalPlayer.Transform != (Object)null))
				{
					return "本地玩家未处于有效对局中";
				}
				val2 = Player.LocalPlayer.Transform.position + Player.LocalPlayer.Transform.forward * 2f + Vector3.up * 0.5f;
				val3 = Player.LocalPlayer.Transform.rotation;
			}
			Item val4 = Object.Instantiate<Item>(entry.Prefab, val2, val3);
			if (!Object.op_Implicit((Object)(object)val4))
			{
				return "实例化失败";
			}
			if (isWeapon)
			{
				Weapon val5 = ((Component)val4).GetComponent<Weapon>() ?? ((Component)val4).GetComponentInChildren<Weapon>();
				if ((Object)(object)val5 != (Object)null)
				{
					Attachments val6 = val5.Attachments ?? ((Component)val5).GetComponent<Attachments>() ?? ((Component)val5).GetComponentInChildren<Attachments>();
					if ((Object)(object)val6 != (Object)null)
					{
						ApplyWeaponAttachments(val6);
					}
				}
			}
			Creature val7 = ((Component)val4).GetComponent<Creature>() ?? ((Component)val4).GetComponentInChildren<Creature>();
			if ((Object)(object)val7 != (Object)null)
			{
				if (SpawnDrip)
				{
					val7.SetDrip();
				}
				if (SpawnDead)
				{
					val7.ServerKillOnSpawn();
				}
				else
				{
					Bird val8 = (Bird)(((object)((val7 is Bird) ? val7 : null)) ?? ((object)(((Component)val4).GetComponent<Bird>() ?? ((Component)val4).GetComponentInChildren<Bird>())));
					if ((Object)(object)val8 != (Object)null)
					{
						float num = val2.y + Random.Range(8f, 16f);
						AccessTools.PropertySetter(typeof(Bird), "FlyHeigth")?.Invoke(val8, new object[1] { num });
					}
				}
			}
			if ((Object)(object)Server.Instance != (Object)null && ((NetworkBehaviour)Server.Instance).IsServerInitialized)
			{
				((NetworkBehaviour)Server.Instance).Spawn(((Component)val4).gameObject, (NetworkConnection)null, default(Scene));
				Plugin.WriteLog("[SPAWNER] 服务器广播生成: " + entry.DisplayName);
				return "✔ 已成功刷出: " + entry.DisplayName;
			}
			Plugin.WriteLog("[SPAWNER] 本地已生成: " + entry.DisplayName);
			return "✔ 已在准星前生成: " + entry.DisplayName;
		}

		private static void ApplyWeaponAttachments(Attachments att)
		{
			try
			{
				List<Sight> value = Traverse.Create((object)att).Field<List<Sight>>("_sights").Value;
				List<BarrelAttachment> value2 = Traverse.Create((object)att).Field<List<BarrelAttachment>>("_barrelAttachments").Value;
				BulletUpgrade[] value3 = Traverse.Create((object)att).Field<BulletUpgrade[]>("_bulletUpgrades").Value;
				if (value != null && value.Count > 1)
				{
					int num = Mathf.Clamp(SelectedSightType, 0, value.Count - 1);
					if (num > 0 && (Object)(object)value[num] != (Object)null && (Object)(object)((Attachment)value[num]).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value[num]).Info);
					}
				}
				if (value2 != null && value2.Count > 1)
				{
					int num2 = Mathf.Clamp(SelectedBarrelType, 0, value2.Count - 1);
					if (num2 > 0 && (Object)(object)value2[num2] != (Object)null && (Object)(object)((Attachment)value2[num2]).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value2[num2]).Info);
					}
				}
				if (SelectedLaser)
				{
					LaserSight value4 = Traverse.Create((object)att).Field<LaserSight>("_laserSight").Value;
					if ((Object)(object)value4 != (Object)null && (Object)(object)((Attachment)value4).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value4).Info);
					}
				}
				if (SelectedExtMag)
				{
					AttachmentInfo value5 = Traverse.Create((object)att).Field<AttachmentInfo>("_extendedMagInfo").Value;
					if ((Object)(object)value5 != (Object)null)
					{
						att.SetAttachment(value5);
					}
				}
				if (value3 != null && value3.Length != 0 && SelectedDamageLevel > 0)
				{
					int num3 = Mathf.Clamp(SelectedDamageLevel, 0, value3.Length - 1);
					att._syncedBulletIndex.Value = (byte)num3;
				}
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[SPAWNER] 配件装配异常: " + ex.Message);
			}
		}
	}
	internal static class MeleeSweep
	{
		private static float _lastSweepTime = -99f;

		private const float SweepCooldown = 0.05f;

		internal static void SweepAll(Player attacker, int damage, float force)
		{
			//IL_0051: 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_0056: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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_0113: 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_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.MeleeLongRange || !Object.op_Implicit((Object)(object)attacker) || Time.time - _lastSweepTime < 0.05f)
			{
				return;
			}
			_lastSweepTime = Time.time;
			Transform camObject = attacker.CamObject;
			Vector3 val = (Object.op_Implicit((Object)(object)camObject) ? camObject.position : ((Component)attacker).transform.position);
			Vector3 val2 = (Object.op_Implicit((Object)(object)camObject) ? camObject.forward : ((Component)attacker).transform.forward);
			Creature[] array = Object.FindObjectsByType<Creature>();
			int num = 0;
			Creature[] array2 = array;
			foreach (Creature val3 in array2)
			{
				if (!Object.op_Implicit((Object)(object)val3) || val3.IsDead)
				{
					continue;
				}
				Fish val4 = (Fish)(object)((val3 is Fish) ? val3 : null);
				if (Object.op_Implicit((Object)(object)val4) && Object.op_Implicit((Object)(object)((Item)val4).AttachedRod))
				{
					continue;
				}
				Vector3 aimPoint = Targeting.GetAimPoint(new AimTarget
				{
					Creature = val3
				}, val, val2);
				Vector3 val5 = aimPoint - val;
				Vector3 val6;
				if (!(((Vector3)(ref val5)).sqrMagnitude > 0.0001f))
				{
					val6 = val2;
				}
				else
				{
					val5 = aimPoint - val;
					val6 = ((Vector3)(ref val5)).normalized;
				}
				Vector3 val7 = val6;
				Vector3 val8 = val7 * force;
				if (val8.y < 0f)
				{
					val8.y = 0f;
				}
				try
				{
					((Item)val3).LocalHit(((Component)val3).transform, aimPoint, val7, attacker, damage, false, val8, false);
					num++;
				}
				catch (Exception ex)
				{
					if (Settings.TelemetryEnabled)
					{
						Plugin.WriteLog("[SWEEP] hit failed on " + ((Object)val3).name + ": " + ex.Message);
					}
				}
			}
			Settings.LastSweepCount = num;
			if (Settings.TelemetryEnabled)
			{
				Plugin.WriteLog("[SWEEP] melee sweep hit=" + num + " damage=" + damage);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerPunching), "FindPunchTarget")]
	internal static class PunchSweepPatch
	{
		private static readonly FieldRef<PlayerPunching, Player> PlayerRef = AccessTools.FieldRefAccess<PlayerPunching, Player>("_player");

		private static readonly FieldRef<PlayerPunching, int> DamageRef = AccessTools.FieldRefAccess<PlayerPunching, int>("_damage");

		private static readonly FieldRef<PlayerPunching, float> ForceRef = AccessTools.FieldRefAccess<PlayerPunching, float>("_force");

		private static void Postfix(PlayerPunching __instance, bool extraCheckMidPunch)
		{
			if (!(!Settings.IsUsable || !Settings.MeleeLongRange || extraCheckMidPunch))
			{
				int damage = (ServerSettings.OneShotEnabled ? 99999 : DamageRef.Invoke(__instance));
				MeleeSweep.SweepAll(PlayerRef.Invoke(__instance), damage, ForceRef.Invoke(__instance));
			}
		}
	}
	[HarmonyPatch(typeof(Melee), "FindAttackTarget")]
	internal static class MeleeSweepPatch
	{
		private static readonly FieldRef<Melee, Player> HolderRef = AccessTools.FieldRefAccess<Melee, Player>("_holder");

		private static readonly FieldRef<Melee, float> ForceRef = AccessTools.FieldRefAccess<Melee, float>("_force");

		private static readonly FieldRef<Melee, SharpnessUpgrade[]> SharpnessRef = AccessTools.FieldRefAccess<Melee, SharpnessUpgrade[]>("_sharpnessUpgrades");

		private static void Postfix(Melee __instance, bool extraCheckMidAttack)
		{
			if (Settings.IsUsable && Settings.MeleeLongRange && !extraCheckMidAttack)
			{
				MeleeSweep.SweepAll(HolderRef.Invoke(__instance), ResolveDamage(__instance), ForceRef.Invoke(__instance));
			}
		}

		private static int ResolveDamage(Melee melee)
		{
			if (ServerSettings.OneShotEnabled)
			{
				return 99999;
			}
			try
			{
				SharpnessUpgrade[] array = SharpnessRef.Invoke(melee);
				if (array != null && array.Length != 0)
				{
					int num = melee._syncedSharpnessIndex.Value;
					if (num < 0 || num >= array.Length)
					{
						num = 0;
					}
					return array[num].Damage;
				}
			}
			catch (Exception ex)
			{
				if (Settings.TelemetryEnabled)
				{
					Plugin.WriteLog("[SWEEP] resolve melee damage failed: " + ex.Message);
				}
			}
			return 0;
		}
	}
	[HarmonyPatch(typeof(Creature), "LocalHit")]
	internal static class MeleeOneShotPatch
	{
		private static void Prefix(Creature __instance, Player player, ref int damage, bool rangedHit)
		{
			if (Settings.IsUsable && Settings.MeleeOneShot && Object.op_Implicit((Object)(object)__instance) && !rangedHit && Object.op_Implicit((Object)(object)player) && ((NetworkBehaviour)player).Owner.IsLocalClient)
			{
				int hp = __instance.Hp;
				if (hp > 0)
				{
					damage = hp;
				}
			}
		}
	}
	internal static class NeonTracerManager
	{
		private static Material _cachedNeonMat;

		private static bool _matResolved;

		private static readonly int IdBaseColor = Shader.PropertyToID("_BaseColor");

		private static readonly int IdColor = Shader.PropertyToID("_Color");

		private static readonly int IdEmissionColor = Shader.PropertyToID("_EmissionColor");

		private static Material ResolveNeonMaterial()
		{
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			if (_matResolved && Object.op_Implicit((Object)(object)_cachedNeonMat))
			{
				return _cachedNeonMat;
			}
			_matResolved = true;
			try
			{
				LaserSight[] array = Resources.FindObjectsOfTypeAll<LaserSight>();
				foreach (LaserSight val in array)
				{
					if (Object.op_Implicit((Object)(object)val))
					{
						LineRenderer componentInChildren = ((Component)val).GetComponentInChildren<LineRenderer>(true);
						if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)((Renderer)componentInChildren).sharedMaterial) && Object.op_Implicit((Object)(object)((Renderer)componentInChildren).sharedMaterial.shader))
						{
							_cachedNeonMat = new Material(((Renderer)componentInChildren).sharedMaterial);
							Plugin.WriteLog("[NEON] 已克隆游戏激光瞄准器材质: " + ((Object)((Renderer)componentInChildren).sharedMaterial.shader).name);
							return _cachedNeonMat;
						}
					}
				}
			}
			catch
			{
			}
			string[] array2 = new string[5] { "Universal Render Pipeline/Unlit", "Universal Render Pipeline/Particles/Unlit", "Universal Render Pipeline/Lit", "Sprites/Default", "Legacy Shaders/Particles/Additive" };
			for (int i = 0; i < array2.Length; i++)
			{
				Shader val2 = Shader.Find(array2[i]);
				if ((Object)(object)val2 != (Object)null)
				{
					_cachedNeonMat = new Material(val2);
					return _cachedNeonMat;
				}
			}
			return null;
		}

		internal static void SpawnTracer(Vector3 start, Vector3 end)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.NeonTracersEnabled && !(Vector3.Distance(start, end) < 0.15f))
			{
				new GameObject("NeonBulletTracer").AddComponent<NeonTracerInstance>().Initialize(start, end, ResolveNeonMaterial());
			}
		}

		internal static void ApplyHdrColor(Material mat, Color hdrColor)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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)
			if (Object.op_Implicit((Object)(object)mat))
			{
				if (mat.HasProperty(IdBaseColor))
				{
					mat.SetColor(IdBaseColor, hdrColor);
				}
				if (mat.HasProperty(IdColor))
				{
					mat.SetColor(IdColor, hdrColor);
				}
				try
				{
					mat.EnableKeyword("_EMISSION");
				}
				catch
				{
				}
				if (mat.HasProperty(IdEmissionColor))
				{
					mat.SetColor(IdEmissionColor, hdrColor);
				}
			}
		}
	}
	internal class NeonTracerInstance : MonoBehaviour
	{
		private LineRenderer _line;

		private Material _matInstance;

		private readonly List<Light> _lights = new List<Light>();

		private readonly List<float> _lightBaseIntensity = new List<float>();

		private float _startTime;

		private const float Lifetime = 5f;

		private const float StartWidth = 0.055f;

		private const float EndWidth = 0.04f;

		private static readonly Color NeonCyan = new Color(0.1f, 0.95f, 1f, 1f);

		private static readonly Color NeonMagenta = new Color(1f, 0.12f, 0.8f, 1f);

		internal void Initialize(Vector3 start, Vector3 end, Material sourceMat)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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)
			//IL_00bf: Expected O, but got Unknown
			//IL_00e3: 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)
			_startTime = Time.time;
			_line = ((Component)this).gameObject.AddComponent<LineRenderer>();
			_line.useWorldSpace = true;
			_line.positionCount = 2;
			_line.SetPosition(0, start);
			_line.SetPosition(1, end);
			_line.startWidth = 0.055f;
			_line.endWidth = 0.04f;
			_line.numCapVertices = 4;
			_line.alignment = (LineAlignment)0;
			((Renderer)_line).shadowCastingMode = (ShadowCastingMode)0;
			((Renderer)_line).receiveShadows = false;
			((Renderer)_line).lightProbeUsage = (LightProbeUsage)0;
			if ((Object)(object)sourceMat != (Object)null)
			{
				_matInstance = new Material(sourceMat);
				((Renderer)_line).material = _matInstance;
			}
			ApplyVisual(1f);
			if (Settings.NeonTracerLights)
			{
				CreateLightsAlong(start, end);
			}
			Object.Destroy((Object)(object)((Component)this).gameObject, 5f);
		}

		private void CreateLightsAlong(Vector3 start, Vector3 end)
		{
			//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)
			//IL_0034: 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_0037: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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)
			int num = Mathf.Clamp(Mathf.RoundToInt(Vector3.Distance(start, end) / 3.5f), 1, 6);
			for (int i = 0; i < num; i++)
			{
				float num2 = ((num == 1) ? 0.5f : ((float)i / (float)(num - 1)));
				Vector3 position = Vector3.Lerp(start, end, num2);
				GameObject val = new GameObject("NeonTracerLight_" + i);
				val.transform.SetParent(((Component)this).transform, true);
				val.transform.position = position;
				Light val2 = val.AddComponent<Light>();
				val2.type = (LightType)2;
				val2.color = Color.Lerp(NeonCyan, NeonMagenta, num2);
				val2.range = Settings.NeonLightRange;
				val2.intensity = Settings.NeonLightIntensity;
				val2.shadows = (LightShadows)0;
				val2.renderMode = (LightRenderMode)2;
				_lights.Add(val2);
				_lightBaseIntensity.Add(val2.intensity);
			}
		}

		private void ApplyVisual(float alpha)
		{
			//IL_0059: 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_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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)
			//IL_0044: 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_0056: 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_0067: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: 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)
			//IL_0080: 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_00b1: 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_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			float neonHdrIntensity = Settings.NeonHdrIntensity;
			Color val;
			Color val2;
			if (Settings.NeonRgbRainbow)
			{
				float num = Mathf.Repeat(Time.time * 0.8f, 1f);
				float num2 = Mathf.Repeat(num + 0.35f, 1f);
				val = Color.HSVToRGB(num, 0.9f, 1f);
				val2 = Color.HSVToRGB(num2, 0.9f, 1f);
			}
			else
			{
				val = NeonCyan;
				val2 = NeonMagenta;
			}
			Color val3 = val * neonHdrIntensity * alpha;
			Color val4 = val2 * neonHdrIntensity * alpha;
			val3.a = alpha;
			val4.a = alpha;
			if (Object.op_Implicit((Object)(object)_line))
			{
				_line.startColor = val3;
				_line.endColor = val4;
				float num3 = Mathf.Lerp(0.1f, 1f, alpha);
				_line.startWidth = 0.055f * num3;
				_line.endWidth = 0.04f * num3;
			}
			if (Object.op_Implicit((Object)(object)_matInstance))
			{
				NeonTracerManager.ApplyHdrColor(_matInstance, Color.Lerp(val3, val4, 0.5f));
			}
			for (int i = 0; i < _lights.Count; i++)
			{
				if (Object.op_Implicit((Object)(object)_lights[i]))
				{
					_lights[i].intensity = _lightBaseIntensity[i] * alpha;
					if (Settings.NeonRgbRainbow)
					{
						float num4 = Mathf.Repeat(Time.time * 0.8f + (float)i * 0.15f, 1f);
						_lights[i].color = Color.HSVToRGB(num4, 0.85f, 1f);
					}
				}
			}
		}

		private void Update()
		{
			float num = Time.time - _startTime;
			float alpha = Mathf.Clamp01(1f - num / 5f);
			ApplyVisual(alpha);
		}

		private void OnDestroy()
		{
			if (Object.op_Implicit((Object)(object)_matInstance))
			{
				Object.Destroy((Object)(object)_matInstance);
			}
		}
	}
	internal static class NeumorphismUI
	{
		internal static readonly Color ColorBase = new Color(0.88f, 0.9f, 0.92f, 1f);

		internal static readonly Color ColorElevated = new Color(0.93f, 0.94f, 0.96f, 1f);

		internal static readonly Color ColorShadowDark = new Color(0.7f, 0.72f, 0.75f, 1f);

		internal static readonly Color ColorShadowLight = new Color(1f, 1f, 1f, 0.95f);

		internal static readonly Color ColorAccent = new Color(0.4f, 0.35f, 0.95f, 1f);

		internal static readonly Color ColorAccentBg = new Color(0.78f, 0.76f, 0.96f, 1f);

		internal static readonly Color ColorTextMain = new Color(0.18f, 0.18f, 0.22f, 1f);

		internal static readonly Color ColorTextSub = new Color(0.45f, 0.48f, 0.54f, 1f);

		internal static readonly Color ColorTextAccent = new Color(0.35f, 0.3f, 0.88f, 1f);

		private static Texture2D _whiteTex;

		private static Font _cjkFont;

		private static bool _fontResolved;

		private static GUIStyle _titleStyle;

		private static GUIStyle _subTitleStyle;

		private static GUIStyle _itemTitleStyle;

		private static GUIStyle _itemDescStyle;

		private static GUIStyle _tabStyle;

		private static GUIStyle _tabActiveStyle;

		private static GUIStyle _btnStyle;

		private static GUIStyle _btnActiveStyle;

		private static GUIStyle _smallStyle;

		private static Font SharedFont => ResolveCjkFont() ?? GUI.skin.label.font;

		internal static GUIStyle TitleStyle
		{
			get
			{
				InitStyles();
				return _titleStyle;
			}
		}

		internal static GUIStyle SubTitleStyle
		{
			get
			{
				InitStyles();
				return _subTitleStyle;
			}
		}

		internal static GUIStyle ItemTitleStyle
		{
			get
			{
				InitStyles();
				return _itemTitleStyle;
			}
		}

		internal static GUIStyle ItemDescStyle
		{
			get
			{
				InitStyles();
				return _itemDescStyle;
			}
		}

		internal static GUIStyle TabStyle
		{
			get
			{
				InitStyles();
				return _tabStyle;
			}
		}

		internal static GUIStyle TabActiveStyle
		{
			get
			{
				InitStyles();
				return _tabActiveStyle;
			}
		}

		internal static GUIStyle BtnStyle
		{
			get
			{
				InitStyles();
				return _btnStyle;
			}
		}

		internal static GUIStyle BtnActiveStyle
		{
			get
			{
				InitStyles();
				return _btnActiveStyle;
			}
		}

		internal static GUIStyle SmallStyle
		{
			get
			{
				InitStyles();
				return _smallStyle;
			}
		}

		private static Texture2D GetWhiteTex()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)_whiteTex))
			{
				_whiteTex = new Texture2D(1, 1);
				_whiteTex.SetPixel(0, 0, Color.white);
				_whiteTex.Apply();
			}
			return _whiteTex;
		}

		private static Font ResolveCjkFont()
		{
			if (_fontResolved)
			{
				return _cjkFont;
			}
			_fontResolved = true;
			string[] array = new string[5] { "Microsoft YaHei", "微软雅黑", "SimHei", "SimSun", "Arial" };
			foreach (string text in array)
			{
				try
				{
					Font val = Font.CreateDynamicFontFromOSFont(text, 14);
					if ((Object)(object)val != (Object)null)
					{
						_cjkFont = val;
						Plugin.WriteLog("[UI] 成功加载系统中文字体: " + text);
						return _cjkFont;
					}
				}
				catch
				{
				}
			}
			_cjkFont = Resources.GetBuiltinResource<Font>("LegacyRuntime.ttf") ?? Resources.GetBuiltinResource<Font>("Arial.ttf");
			return _cjkFont;
		}

		private static void InitStyles()
		{
			//IL_0028: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			if (_titleStyle == null || !((Object)(object)_titleStyle.font == (Object)(object)SharedFont))
			{
				Font sharedFont = SharedFont;
				_titleStyle = MakeStyle(sharedFont, 15, (FontStyle)1, (TextAnchor)3, ColorTextMain);
				_subTitleStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextAccent);
				_itemTitleStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)3, ColorTextMain);
				_itemDescStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextSub);
				_tabStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)4, ColorTextSub);
				_tabActiveStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)4, ColorAccent);
				_btnStyle = MakeStyle(sharedFont, 11, (FontStyle)0, (TextAnchor)4, ColorTextMain);
				_btnActiveStyle = MakeStyle(sharedFont, 11, (FontStyle)1, (TextAnchor)4, ColorAccent);
				_smallStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextSub);
			}
		}

		private static GUIStyle MakeStyle(Font font, int size, FontStyle style, TextAnchor anchor, Color color)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: 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_0032: 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)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				font = font,
				fontSize = size,
				fontStyle = style,
				alignment = anchor,
				clipping = (TextClipping)1,
				wordWrap = false
			};
			val.normal.textColor = color;
			return val;
		}

		internal static void DrawSolid(Rect rect, Color col)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: 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)
			Color color = GUI.color;
			GUI.color = col;
			GUI.DrawTexture(rect, (Texture)(object)GetWhiteTex());
			GUI.color = color;
		}

		internal static void DrawSoftShadow(Rect rect, bool isInset, int depth = 3)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: 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_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			Color val = (isInset ? ColorShadowDark : ColorShadowLight);
			Color val2 = (isInset ? ColorShadowLight : ColorShadowDark);
			Color col = default(Color);
			Color col2 = default(Color);
			for (int i = 0; i < depth; i++)
			{
				float num = i + 1;
				float num2 = Mathf.Lerp(0.8f, 0.2f, (float)i / (float)depth);
				((Color)(ref col))..ctor(val.r, val.g, val.b, val.a * num2);
				((Color)(ref col2))..ctor(val2.r, val2.g, val2.b, val2.a * num2);
				if (isInset)
				{
					DrawSolid(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + (float)i, ((Rect)(ref rect)).width - (float)i, 1f), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x + (float)i, ((Rect)(ref rect)).y, 1f, ((Rect)(ref rect)).height - (float)i), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x + (float)i, ((Rect)(ref rect)).yMax - num, ((Rect)(ref rect)).width - (float)i, 1f), col2);
					DrawSolid(new Rect(((Rect)(ref rect)).xMax - num, ((Rect)(ref rect)).y + (float)i, 1f, ((Rect)(ref rect)).height - (float)i), col2);
				}
				else
				{
					DrawSolid(new Rect(((Rect)(ref rect)).x - num, ((Rect)(ref rect)).y - num, ((Rect)(ref rect)).width + num, 1f), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x - num, ((Rect)(ref rect)).y - num, 1f, ((Rect)(ref rect)).height + num), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).yMax + (float)i, ((Rect)(ref rect)).width + num, 1f), col2);
					DrawSolid(new Rect(((Rect)(ref rect)).xMax + (float)i, ((Rect)(ref rect)).y, 1f, ((Rect)(ref rect)).height + num), col2);
				}
			}
		}

		internal static void DrawNeumorphicPlate(Rect rect, bool isInset, bool isHover = false)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: 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)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			int depth = (isHover ? 2 : 3);
			Color col = (isInset ? ColorBase : (isHover ? ColorElevated : ColorBase));
			DrawSolid(rect, col);
			DrawSoftShadow(rect, isInset, depth);
		}

		internal static bool DrawTab(Rect rect, string text, bool isSelected)
		{
			//IL_000c: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, isSelected, isHover);
			if (isSelected)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 8f, ((Rect)(ref rect)).yMax - 3f, ((Rect)(ref rect)).width - 16f, 2f), ColorAccent);
			}
			GUI.Label(rect, text, isSelected ? _tabActiveStyle : _tabStyle);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return true;
			}
			return false;
		}

		internal static bool DrawButton(Rect rect, string text, bool isActive = false)
		{
			//IL_000c: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, isActive, isHover);
			if (isActive)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 2f, ((Rect)(ref rect)).y + 4f, 3f, ((Rect)(ref rect)).height - 8f), ColorAccent);
			}
			GUI.Label(rect, text, isActive ? _btnActiveStyle : _btnStyle);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return true;
			}
			return false;
		}

		internal static bool DrawToggleCard(Rect rect, string title, string desc, bool state)
		{
			//IL_000c: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: 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_01d6: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, state, isHover);
			if (state)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 2f, ((Rect)(ref rect)).y + 4f, 3f, ((Rect)(ref rect)).height - 8f), ColorAccent);
			}
			float num = 42f;
			float num2 = 20f;
			Rect rect2 = default(Rect);
			((Rect)(ref rect2))..ctor(((Rect)(ref rect)).xMax - num - 10f, ((Rect)(ref rect)).y + (((Rect)(ref rect)).height - num2) * 0.5f, num, num2);
			float num3 = ((Rect)(ref rect)).x + 10f;
			float num4 = ((Rect)(ref rect)).width - num - 22f;
			if (string.IsNullOrEmpty(desc))
			{
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + (((Rect)(ref rect)).height - 20f) * 0.5f, num4, 20f), title, _itemTitleStyle);
			}
			else
			{
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + 4f, num4, 18f), title, _itemTitleStyle);
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + 24f, num4, 16f), desc, _itemDescStyle);
			}
			DrawSolid(rect2, state ? ColorAccentBg : ColorBase);
			DrawSoftShadow(rect2, isInset: true, 2);
			float num5 = 14f;
			float num6 = (state ? (((Rect)(ref rect2)).xMax - num5 - 3f) : (((Rect)(ref rect2)).x + 3f));
			Rect rect3 = new Rect(num6, ((Rect)(ref rect2)).y + (num2 - num5) * 0.5f, num5, num5);
			DrawSolid(rect3, state ? ColorAccent : ColorElevated);
			DrawSoftShadow(rect3, isInset: false, 2);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return !state;
			}
			return state;
		}

		internal static void DrawTrueCrosshair()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_0081: 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)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.TrueCrosshairEnabled)
			{
				float num = (float)Screen.width * 0.5f;
				float num2 = (float)Screen.height * 0.5f;
				DrawSolid(new Rect(num - 3f, num2 - 3f, 6f, 6f), new Color(0f, 0f, 0f, 0.7f));
				DrawSolid(new Rect(num - 1.5f, num2 - 1.5f, 3f, 3f), ColorAccent);
				if (Settings.CrosshairShowLines)
				{
					float num3 = 8f;
					float num4 = 5f;
					float num5 = 1.5f;
					DrawSolid(new Rect(num - num3 - num4, num2 - num5 * 0.5f, num3, num5), ColorAccent);
					DrawSolid(new Rect(num + num4, num2 - num5 * 0.5f, num3, num5), ColorAccent);
					DrawSolid(new Rect(num - num5 * 0.5f, num2 - num3 - num4, num5, num3), ColorAccent);
					DrawSolid(new Rect(num - num5 * 0.5f, num2 + num4, num5, num3), ColorAccent);
				}
			}
		}
	}
	internal static class NightModeManager
	{
		private struct LightBackup
		{
			public Color Color;

			public float Intensity;
		}

		private static bool _lastNightState = false;

		private static bool _hasOriginalBackup = false;

		private static Color _origAmbientLight;

		private static float _origAmbientIntensity;

		private static Color _origFogColor;

		private static readonly Dictionary<Light, LightBackup> _origDirLights = new Dictionary<Light, LightBackup>();

		internal static void Update()
		{
			if (Settings.NightMode != _lastNightState)
			{
				_lastNightState = Settings.NightMode;
				if (Settings.NightMode)
				{
					ApplyNightMode();
				}
				else
				{
					RestoreDayMode();
				}
			}
		}

		private static void ApplyNightMode()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: 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_00a2: Invalid comparison between Unknown and I4
			//IL_00b5: 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)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (!_hasOriginalBackup)
				{
					_origAmbientLight = RenderSettings.ambientLight;
					_origAmbientIntensity = RenderSettings.ambientIntensity;
					_origFogColor = RenderSettings.fogColor;
					_hasOriginalBackup = true;
				}
				RenderSettings.ambientLight = new Color(0.015f, 0.025f, 0.06f, 1f);
				RenderSettings.ambientIntensity = 0.25f;
				if (RenderSettings.fog)
				{
					RenderSettings.fogColor = new Color(0.008f, 0.012f, 0.035f, 1f);
				}
				Light[] array = Resources.FindObjectsOfTypeAll<Light>();
				_origDirLights.Clear();
				Light[] array2 = array;
				foreach (Light val in array2)
				{
					if (Object.op_Implicit((Object)(object)val) && (int)val.type == 1)
					{
						_origDirLights[val] = new LightBackup
						{
							Color = val.color,
							Intensity = val.intensity
						};
						val.color = new Color(0.15f, 0.22f, 0.45f, 1f);
						val.intensity = Mathf.Min(val.intensity * 0.22f, 0.28f);
					}
				}
				Plugin.WriteLog("[NIGHT-MODE] \ud83c\udf19 已成功开启赛博黑夜模式!");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[NIGHT-MODE] 开启黑夜模式异常: " + ex.Message);
			}
		}

		private static void RestoreDayMode()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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)
			try
			{
				if (_hasOriginalBackup)
				{
					RenderSettings.ambientLight = _origAmbientLight;
					RenderSettings.ambientIntensity = _origAmbientIntensity;
					RenderSettings.fogColor = _origFogColor;
				}
				foreach (KeyValuePair<Light, LightBackup> origDirLight in _origDirLights)
				{
					if ((Object)(object)origDirLight.Key != (Object)null)
					{
						origDirLight.Key.color = origDirLight.Value.Color;
						origDirLight.Key.intensity = origDirLight.Value.Intensity;
					}
				}
				_origDirLights.Clear();
				Plugin.WriteLog("[NIGHT-MODE] ☀\ufe0f 已恢复原版白昼光照模式!");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[NIGHT-MODE] 还原白昼模式异常: " + ex.Message);
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "Shoot")]
	internal static class NoReloadPatch
	{
		private static readonly FieldRef<Weapon, Attachments> AttachmentsRef = AccessTools.FieldRefAccess<Weapon, Attachments>("_attachments");

		private static readonly FieldRef<Weapon, int> AmmoBackingField = AccessTools.FieldRefAccess<Weapon, int>("<Ammo>k__BackingField");

		private static void Prefix(Weapon __instance)
		{
			if (!Settings.IsUsable || !Settings.NoReload || !Object.op_Implicit((Object)(object)__instance))
			{
				return;
			}
			Attachments val = AttachmentsRef.Invoke(__instance);
			if (Object.op_Implicit((Object)(object)val))
			{
				int ammoPerMag = val.AmmoPerMag;
				if (ammoPerMag > 0 && AmmoBackingField.Invoke(__instance) < ammoPerMag)
				{
					AmmoBackingField.Invoke(__instance) = ammoPerMag;
				}
			}
		}
	}
	[BepInPlugin("com.yourname.fishaimbot", "Fish Aimbot Unified", "5.0.0")]
	public sealed class Plugin : BaseUnityPlugin
	{
		internal static Plugin Instance;

		internal static Harmony Harmony;

		private static Rect _windowRect = new Rect(60f, 60f, 720f, 620f);

		private static bool _isDragging = false;

		private static Vector2 _dragOffset;

		private static bool _isResizing = false;

		private static Vector2 _resizeStartPos;

		private static Vector2 _resizeStartSize;

		private static string _lastSpawnMsg = "";

		private static float _spawnMsgTime;

		private static Vector2 _spawnerScrollPos;

		private void Awake()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			Instance = this;
			Harmony = new Harmony("com.yourname.fishaimbot");
			int num = 0;
			int num2 = 0;
			Type[] types = typeof(Plugin).Assembly.GetTypes();
			foreach (Type type in types)
			{
				if (type.GetCustomAttributes(typeof(HarmonyPatch), inherit: true).Length != 0)
				{
					try
					{
						Harmony.CreateClassProcessor(type).Patch();
						num++;
					}
					catch (Exception ex)
					{
						num2++;
						((BaseUnityPlugin)this).Logger.LogError((object)("补丁失败 " + type.Name + ": " + ex.Message));
					}
				}
			}
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Fish Aimbot Unified v5.0.0 (Official Release / Full Features) loaded (" + num + " 补丁成功). Press F3 to open."));
		}

		internal static void WriteLog(string message)
		{
			if (Settings.TelemetryEnabled && (Object)(object)Instance != (Object)null)
			{
				((BaseUnityPlugin)Instance).Logger.LogInfo((object)message);
			}
		}

		private void Update()
		{
			NightModeManager.Update();
			WeaponSkinGlowManager.Update();
			if (Input.GetKeyDown((KeyCode)284))
			{
				Settings.MenuOpen = !Settings.MenuOpen;
				ItemSpawnerUtility.EnsureCache();
				PlayerCamera.ToggleMouse(Settings.MenuOpen);
			}
			if (Settings.MenuOpen)
			{
				Cursor.lockState = (CursorLockMode)0;
				Cursor.visible = true;
			}
			if (Input.GetKeyDown((KeyCode)286))
			{
				Settings.AutoShootEnabled = !Settings.AutoShootEnabled;
			}
			if (Input.GetKeyDown((KeyCode)290))
			{
				Settings.TelemetryEnabled = !Settings.TelemetryEnabled;
			}
		}

		private static void HandleWindowDragAndResize()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Invalid comparison between Unknown and I4
			//IL_0047: 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_00ac: Invalid comparison between Unknown and I4
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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)
			//IL_0074: 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_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Invalid comparison between Unknown and I4
			//IL_0162: 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)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Invalid comparison between Unknown and I4
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: 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_018f: 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_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			Event current = Event.current;
			Vector2 mousePosition = current.mousePosition;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref _windowRect)).x, ((Rect)(ref _windowRect)).y, ((Rect)(ref _windowRect)).width - 130f, 48f);
			if ((int)current.type == 0 && ((Rect)(ref val)).Contains(mousePosition))
			{
				_isDragging = true;
				_dragOffset = mousePosition - new Vector2(((Rect)(ref _windowRect)).x, ((Rect)(ref _windowRect)).y);
				current.Use();
			}
			else if ((int)current.type == 1 && _isDragging)
			{
				_isDragging = false;
				current.Use();
			}
			else if ((int)current.type == 3 && _isDragging)
			{
				((Rect)(ref _windowRect)).x = Mathf.Clamp(mousePosition.x - _dragOffset.x, 0f, (float)Screen.width - ((Rect)(ref _windowRect)).width);
				((Rect)(ref _windowRect)).y = Mathf.Clamp(mousePosition.y - _dragOffset.y, 0f, (float)Screen.height - ((Rect)(ref _windowRect)).height);
				current.Use();
			}
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(((Rect)(ref _windowRect)).xMax - 24f, ((Rect)(ref _windowRect)).yMax - 24f, 24f, 24f);
			if ((int)current.type == 0 && ((Rect)(ref val2)).Contains(mousePosition))
			{
				_isResizing = true;
				_resizeStartPos = mousePosition;
				_resizeStartSize = new Vector2(((Rect)(ref _windowRect)).width, ((Rect)(ref _windowRect)).height);
				current.Use();
			}
			else if ((int)current.type == 1 && _isResizing)
			{
				_isResizing = false;
				current.Use();
			}
			else if ((int)current.type == 3 && _isResizing)
			{
				Vector2 val3 = mousePosition - _resizeStartPos;
				((Rect)(ref _windowRect)).width = Mathf.Clamp(_resizeStartSize.x + val3.x, 580f, (float)Screen.width - ((Rect)(ref _windowRect)).x);
				((Rect)(ref _windowRect)).height = Mathf.Clamp(_resizeStartSize.y + val3.y, 480f, (float)Screen.height - ((Rect)(ref _windowRect)).y);
				current.Use();
			}
		}

		private void OnGUI()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_1526: Unknown result type (might be due to invalid IL or missing references)
			//IL_1564: Unknown result type (might be due to invalid IL or missing references)
			//IL_1569: Unknown result type (might be due to invalid IL or missing references)
			//IL_1571: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_081e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_08be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0868: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Unknown result type (might be due to invalid IL or missing references)
			//IL_0747: Unknown result type (might be due to invalid IL or missing references)
			//IL_077a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1245: Unknown result type (might be due to invalid IL or missing references)
			//IL_1288: Unknown result type (might be due to invalid IL or missing references)
			//IL_12bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_12fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_090b: Unknown result type (might be due to invalid IL or missing references)
			//IL_095d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_1340: Unknown result type (might be due to invalid IL or missing references)
			//IL_1345: Unknown result type (might be due to invalid IL or missing references)
			//IL_134c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a84: Unknown result type (might be due to invalid IL or missing references)
			//IL_13ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_13e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_1410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0daa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1442: Unknown result type (might be due to invalid IL or missing references)
			//IL_143b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1467: Unknown result type (might be due to invalid IL or missing references)
			//IL_147d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de3: Unknown result type (might be due to invalid IL or missing references)
			//IL_14af: Unknown result type (might be due to invalid IL or missing references)
			//IL_14a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_112e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f94: Unknown result type (might be due to invalid IL or missing references)
			//IL_1188: Unknown result type (might be due to invalid IL or missing references)
			//IL_1008: Unknown result type (might be due to invalid IL or missing references)
			//IL_105d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1090: Unknown result type (might be due to invalid IL or missing references)
			//IL_14e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_14da: Unknown result type (might be due to invalid IL or missing references)
			//IL_1210: Unknown result type (might be due to invalid IL or missing references)
			NeumorphismUI.DrawTrueCrosshair();
			if (!Settings.MenuOpen)
			{
				return;
			}
			GUI.depth = -1000;
			HandleWindowDragAndResize();
			NeumorphismUI.DrawNeumorphicPlate(_windowRect, isInset: false);
			float num = 16f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref _windowRect)).x + num, ((Rect)(ref _windowRect)).y + 10f, ((Rect)(ref _windowRect)).width - num * 2f, 42f);
			GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y + 2f, 320f, 20f), "FISH AIMBOT UNIFIED", NeumorphismUI.TitleStyle);
			GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y + 22f, 320f, 16f), "多功能大一统辅助 · 新拟物软UI v3.3", NeumorphismUI.SubTitleStyle);
			Settings.MasterEnabled = NeumorphismUI.DrawToggleCard(new Rect(((Rect)(ref _windowRect)).xMax - 130f, ((Rect)(ref val)).y + 2f, 114f, 36f), "主控开关", null, Settings.MasterEnabled);
			float num2 = ((Rect)(ref _windowRect)).y + 56f;
			float num3 = (((Rect)(ref _windowRect)).width - num * 2f) / 7f;
			string[] array = new string[7] { "战斗", "生存", "移动", "视觉", "生成", "联机", "状态" };
			for (int i = 0; i < array.Length; i++)
			{
				if (NeumorphismUI.DrawTab(new Rect(((Rect)(ref _windowRect)).x + num + (float)i * num3, num2, num3 - 4f, 32f), array[i], Settings.CurrentTab == (MenuTab)i))
				{
					Settings.CurrentTab = (MenuTab)i;
				}
			}
			float num4 = ((Rect)(ref _windowRect)).height - 146f;
			Rect rect = default(Rect);
			((Rect)(ref rect))..ctor(((Rect)(ref _windowRect)).x + num, num2 + 38f, ((Rect)(ref _windowRect)).width - num * 2f, num4);
			NeumorphismUI.DrawNeumorphicPlate(rect, isInset: true);
			float num5 = ((Rect)(ref rect)).y + 12f;
			float num6 = 46f;
			float num7 = 6f;
			float num8 = 10f;
			float num9 = (((Rect)(ref rect)).width - 24f - num8) * 0.5f;
			float num10 = ((Rect)(ref rect)).x + 12f;
			float num11 = num10 + num9 + num8;
			Rect statusCard;
			float sY;
			float sLineH;
			float sPadding;
			if (Settings.CurrentTab == MenuTab.Combat)
			{
				Settings.BulletTrackingEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "智能子弹追踪 (默认开)", "全向折跃追击目标", Settings.BulletTrackingEnabled);
				Settings.AimEnabled = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "自瞄吸附锁定", "按住右键(M2)吸附", Settings.AimEnabled);
				num5 += num6 + num7;
				if (Settings.BulletTrackingEnabled)
				{
					float num12 = 38f;
					Settings.HeadPriority = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num12), "└ 智能弱点追踪", "有头打头·掩体打露出部位", Settings.HeadPriority);
					num5 += num12 + num7;
				}
				Settings.AutoShootEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "⚡ 自动射击 (F5)", "视线无遮挡时自动极速连发", Settings.AutoShootEnabled);
				Settings.FastShoot = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "极速连射 (狂暴连击)", "解除射击后摇狂暴泼水", Settings.FastShoot);
				num5 += num6 + num7;
				Settings.ExplosiveBullets = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udca5 炸药子弹 (大爆炸)", "受击引爆真实炸药烟雾火光", Settings.ExplosiveBullets);
				Settings.NoRecoil = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "无后坐力", "武器射击零后坐力击退", Settings.NoRecoil);
				num5 += num6 + num7;
				Settings.NoSpread = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "零散布 (绝对精准)", "弹道零散射打在正中心", Settings.NoSpread);
				Settings.TargetBirds = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "锁定飞鸟目标", "海鸥/信天翁等空中目标", Settings.TargetBirds);
				num5 += num6 + num7;
				Settings.TargetTeammates = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "锁定队友 (玩闹模式)", "准星对准联机队友时可锁定", Settings.TargetTeammates);
			}
			else if (Settings.CurrentTab == MenuTab.Survival)
			{
				Settings.GodMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udee1\ufe0f 无限生命 (锁血无敌)", "免疫一切伤害与攻击", Settings.GodMode);
				Settings.InfiniteHunger = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83c\udf57 无限饱食度", "饱食度锁满永远不挨饿", Settings.InfiniteHunger);
				num5 += num6 + num7;
				Settings.KeepInventory = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "死亡不掉落 (双端保全)", "复活后手持与背包物品完整保留", Settings.KeepInventory);
				Settings.NoReload = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "免换弹 (无限弹匣)", "开火前自动填满弹药畅快连发", Settings.NoReload);
				num5 += num6 + num7;
				Settings.MeleeLongRange = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "近战全场群伤", "原地出拳挥刀全图生物受创", Settings.MeleeLongRange);
				Settings.PeacefulSeagulls = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "海鸥和平模式", "海鸥不再偷抢渔获与地面物品", Settings.PeacefulSeagulls);
				num5 += num6 + num7;
				if (Settings.MeleeLongRange)
				{
					float num13 = 38f;
					Settings.MeleeOneShot = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num13), "└ 近战一击必杀", "伤害按目标当前血量直接秒杀", Settings.MeleeOneShot);
					num5 += num13 + num7;
				}
			}
			else if (Settings.CurrentTab == MenuTab.Movement)
			{
				string text = "\ud83c\udfc3 移动速度: " + Settings.MoveSpeedMultiplier.ToString("F1") + "x";
				if (NeumorphismUI.DrawButton(new Rect(num10, num5, num9, num6), text, Settings.MoveSpeedMultiplier > 1f))
				{
					if (Settings.MoveSpeedMultiplier < 1.5f)
					{
						Settings.MoveSpeedMultiplier = 2f;
					}
					else if (Settings.MoveSpeedMultiplier < 2.5f)
					{
						Settings.MoveSpeedMultiplier = 3f;
					}
					else if (Settings.MoveSpeedMultiplier < 4f)
					{
						Settings.MoveSpeedMultiplier = 5f;
					}
					else
					{
						Settings.MoveSpeedMultiplier = 1f;
					}
				}
				string text2 = "\ud83e\udd98 跳跃高度: " + Settings.JumpHeightMultiplier.ToString("F1") + "x";
				if (NeumorphismUI.DrawButton(new Rect(num11, num5, num9, num6), text2, Settings.JumpHeightMultiplier > 1f))
				{
					if (Settings.JumpHeightMultiplier < 1.5f)
					{
						Settings.JumpHeightMultiplier = 2f;
					}
					else if (Settings.JumpHeightMultiplier < 2.5f)
					{
						Settings.JumpHeightMultiplier = 3f;
					}
					else
					{
						Settings.JumpHeightMultiplier = 1f;
					}
				}
				num5 += num6 + num7;
				Settings.FlyMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udd4a\ufe0f 自由飞天", "空格键上升 / Ctrl键下降", Settings.FlyMode);
				Settings.NoclipMode = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83d\udc7b 穿墙模式", "消除物理碰撞穿越障碍物", Settings.NoclipMode);
				num5 += num6 + num7;
				Settings.FreeShopping = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\uded2 购买无视金钱 (零元购)", "商店物品完全免费购买", Settings.FreeShopping);
				Settings.CasinoAlwaysWin = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83c\udfb0 轮盘赌金币必胜", "押注颜色100%获胜翻倍", Settings.CasinoAlwaysWin);
				num5 += num6 + num7;
				if (NeumorphismUI.DrawButton(new Rect(num10, num5, num9, 36f), "\ud83d\udcb0 一键修改金钱 +99999", isActive: true) && (Object)(object)MoneyManager.Instance != (Object)null)
				{
					SyncVar<int> money = MoneyManager.Instance._money;
					money.Value += 99999;
				}
				if (NeumorphismUI.DrawButton(new Rect(num11, num5, num9, 36f), "\ud83c\udf92 一键解锁全部背包 (1~5格)", isActive: true))
				{
					InventoryExpander.UnlockMaxSlots();
				}
				num5 += 42f;
			}
			else if (Settings.CurrentTab == MenuTab.Visuals)
			{
				Settings.NeonTracersEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "5秒发光霓虹激光", "开火生成静止发光高亮激光束渐隐淡出", Settings.NeonTracersEnabled);
				Settings.TrueCrosshairEnabled = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "真·中心点准星", "屏幕物理正中心高对比度激光瞄准点", Settings.TrueCrosshairEnabled);
				num5 += num6 + num7;
				if (Settings.TrueCrosshairEnabled)
				{
					float num14 = 38f;
					Settings.CrosshairShowLines = NeumorphismUI.DrawToggleCard(new Rect(num11 + 16f, num5, num9 - 16f, num14), "└ 准星十字辅助线", "在中心点外侧渲染四向发光指示线", Settings.CrosshairShowLines);
					num5 += num14 + num7;
				}
				Settings.NightMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83c\udf19 赛博黑夜模式", "切换为幽冷暗夜环境(配合霓虹大片感)", Settings.NightMode);
				Settings.WeaponSkinGlow = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83d\udca1 武器皮肤自适应发光", "枪械与匕首按皮肤配色自发光", Settings.WeaponSkinGlow);
				num5 += num6 + num7;
				if (Settings.WeaponSkinGlow)
				{
					float num15 = 38f;
					Settings.WeaponSkinGlowLight = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num15), "└ 武器环境流光灯", "动态照亮手部与周围环境", Settings.

BepInEx/plugins/FishAimbot/AimbotRevised.dll

Decompiled 17 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using FishNet.Connection;
using FishNet.Object;
using FishNet.Object.Synchronizing;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Steamworks;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AimbotRevised")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+c06467c114f136a0d0f9eb456ffd0b7ce2bc3248")]
[assembly: AssemblyProduct("AimbotRevised")]
[assembly: AssemblyTitle("AimbotRevised")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 FishAimbotMod
{
	[HarmonyPatch(typeof(PlayerCamera), "ApplyAimAssist")]
	internal static class AimAssistPatch
	{
		private static readonly FieldRef<PlayerCamera, Vector3> Rotation = AccessTools.FieldRefAccess<PlayerCamera, Vector3>("_rot");

		private static void Postfix(PlayerCamera __instance)
		{
			//IL_0023: 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)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_0073: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_009a: 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_00c8: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.AimEnabled && Input.GetKey((KeyCode)324))
			{
				Transform camTransform = __instance.CamTransform;
				AimTarget aimTarget = Targeting.FindBest(camTransform.position, camTransform.forward, 180f);
				if (aimTarget.IsValid)
				{
					Settings.CurrentTarget = aimTarget;
					Settings.TargetId = aimTarget.Id;
					Vector3 val = (Settings.LastTargetPoint = Targeting.GetAimPoint(aimTarget, camTransform.position, camTransform.forward)) - camTransform.position;
					Vector3 normalized = ((Vector3)(ref val)).normalized;
					Vector3 val2 = Rotation.Invoke(__instance);
					val2.x = Mathf.Clamp((0f - Mathf.Asin(normalized.y)) * 57.29578f, -90f, 90f);
					val2.y = Mathf.Atan2(normalized.x, normalized.z) * 57.29578f;
					Rotation.Invoke(__instance) = val2;
				}
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "Update")]
	internal static class WeaponAutoShootPatch
	{
		private static readonly FieldRef<Weapon, bool> HasCoolDownRef = AccessTools.FieldRefAccess<Weapon, bool>("_hasCoolDown");

		private static readonly FieldRef<Weapon, bool> IsReloadingRef = AccessTools.FieldRefAccess<Weapon, bool>("_isReloading");

		private static readonly MethodInfo ShootMethod = AccessTools.Method(typeof(Weapon), "Shoot", (Type[])null, (Type[])null);

		private static readonly FieldRef<Weapon, bool> HoldingFireInputRef = AccessTools.FieldRefAccess<Weapon, bool>("_holdingFireInput");

		private static readonly FieldRef<Weapon, bool> QueuedShootRef = AccessTools.FieldRefAccess<Weapon, bool>("_queuedShoot");

		private static void Postfix(Weapon __instance)
		{
			//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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.AutoShootEnabled || !Object.op_Implicit((Object)(object)__instance) || !Object.op_Implicit((Object)(object)((Item)__instance).Holder) || !((NetworkBehaviour)((Item)__instance).Holder).Owner.IsLocalClient || __instance.Ammo <= 0 || IsReloadingRef.Invoke(__instance) || (!Settings.FastShoot && HasCoolDownRef.Invoke(__instance)))
			{
				return;
			}
			Player holder = ((Item)__instance).Holder;
			Transform val = (Object.op_Implicit((Object)(object)holder.Camera) ? holder.Camera.CamTransform : holder.CamObject);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return;
			}
			Vector3 position = val.position;
			Vector3 forward = val.forward;
			AimTarget aimTarget = Settings.CurrentTarget;
			if (!aimTarget.IsValid)
			{
				aimTarget = Targeting.FindBest(position, forward, 75f);
				if (!aimTarget.IsValid)
				{
					aimTarget = Targeting.FindBest(position, forward, 180f);
				}
			}
			if (!aimTarget.IsValid)
			{
				return;
			}
			Vector3 aimPoint = Targeting.GetAimPoint(aimTarget, position, forward);
			if (aimPoint == Vector3.zero)
			{
				return;
			}
			Vector3 val2 = aimPoint - position;
			float magnitude = ((Vector3)(ref val2)).magnitude;
			if (magnitude < 0.1f)
			{
				return;
			}
			LayerMask val3 = LayerMask.op_Implicit(LayerMask.op_Implicit(GameInfo.LevelLayer) | LayerMask.op_Implicit(GameInfo.BoatLayer));
			if (Physics.Raycast(position, ((Vector3)(ref val2)).normalized, magnitude - 0.15f, LayerMask.op_Implicit(val3)))
			{
				return;
			}
			try
			{
				HoldingFireInputRef.Invoke(__instance) = true;
				QueuedShootRef.Invoke(__instance) = true;
				ShootMethod.Invoke(__instance, null);
				Settings.CurrentTarget = aimTarget;
				Settings.LastTargetPoint = aimPoint;
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[AUTO-SHOOT] 自动开枪异常: " + ex.Message);
			}
		}
	}
	internal static class Tracking
	{
		internal static bool TryRedirect(Vector3 position, Vector3 velocity, out Vector3 redirected)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: 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_003d: 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_009b: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_0043: 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_00a0: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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)
			redirected = velocity;
			if (!Settings.IsUsable || !Settings.BulletTrackingEnabled)
			{
				return false;
			}
			AimTarget aimTarget = Settings.CurrentTarget;
			if (!aimTarget.IsValid)
			{
				Vector3 lookDirection = ((((Vector3)(ref velocity)).sqrMagnitude > 0.001f) ? ((Vector3)(ref velocity)).normalized : Vector3.forward);
				aimTarget = Targeting.FindBest(position, lookDirection, 180f);
				if (!aimTarget.IsValid)
				{
					aimTarget = Targeting.FindBest(position, lookDirection, 360f);
				}
			}
			if (!aimTarget.IsValid)
			{
				return false;
			}
			AimTarget target = aimTarget;
			Vector3 normalized;
			if (!(((Vector3)(ref velocity)).sqrMagnitude > 0.0001f))
			{
				Vector3 val = aimTarget.RootPosition - position;
				normalized = ((Vector3)(ref val)).normalized;
			}
			else
			{
				normalized = ((Vector3)(ref velocity)).normalized;
			}
			Vector3 aimPoint = Targeting.GetAimPoint(target, position, normalized);
			Vector3 val2 = aimPoint - position;
			if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f)
			{
				return false;
			}
			redirected = ((Vector3)(ref val2)).normalized * ((Vector3)(ref velocity)).magnitude;
			Settings.LastTargetPoint = aimPoint;
			Settings.CurrentTarget = aimTarget;
			return true;
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectile")]
	internal static class AddProjectileTrackingPatch
	{
		private static void Prefix(bool isLocal, Vector3 pos, ref Vector3 velocity)
		{
			//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_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: 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_0039: 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_0048: 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_001b: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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)
			Vector3 original = velocity;
			if (isLocal)
			{
				Vector3 end;
				if (Tracking.TryRedirect(pos, velocity, out var redirected))
				{
					velocity = redirected;
					end = Settings.LastTargetPoint;
					Settings.RecordRedirect("单发/即时命中", pos, original, redirected);
				}
				else
				{
					end = pos + ((Vector3)(ref original)).normalized * 120f;
				}
				NeonTracerManager.SpawnTracer(pos, end);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectiles")]
	internal static class AddProjectilesTrackingPatch
	{
		private static void Prefix(bool isLocal, Vector3 pos, Vector3[] velocities)
		{
			//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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			if (!isLocal || velocities == null)
			{
				return;
			}
			for (int i = 0; i < velocities.Length; i++)
			{
				Vector3 original = velocities[i];
				Vector3 end;
				if (Tracking.TryRedirect(pos, velocities[i], out var redirected))
				{
					velocities[i] = redirected;
					end = Settings.LastTargetPoint;
					Settings.RecordRedirect("多发/即时命中", pos, original, redirected);
				}
				else
				{
					end = pos + ((Vector3)(ref original)).normalized * 120f;
				}
				NeonTracerManager.SpawnTracer(pos, end);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "UpdateProjectilePos")]
	internal static class BulletTrackingPatch
	{
		private static void Prefix(Projectile projectile)
		{
			//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_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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)
			//IL_002a: 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_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			if (projectile != null && projectile.IsLocal)
			{
				Vector3 velocity = projectile.Velocity;
				if (Tracking.TryRedirect(projectile.Position, projectile.Velocity, out var redirected))
				{
					projectile.Velocity = redirected;
					Settings.RecordRedirect("飞行中", projectile.Position, velocity, redirected);
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "Hit")]
	internal static class ExplosiveBulletsHitPatch
	{
		private static void Postfix(Projectile projectile, ProjectileType type, RaycastHit hit)
		{
			//IL_0052: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_00e6: 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)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.ExplosiveBullets || projectile == null || !projectile.IsLocal)
			{
				return;
			}
			Vector3 point = ((RaycastHit)(ref hit)).point;
			try
			{
				BossManager.BossExplosion(point, false);
				AudioManager.PlayClipAt("Explosion", point, false, (AudioDistance)3, 1.2f, 0.1f);
			}
			catch
			{
			}
			try
			{
				float num = 8.5f;
				int num2 = 150;
				Collider[] array = Physics.OverlapSphere(point, num);
				if (array == null)
				{
					return;
				}
				List<Creature> list = new List<Creature>();
				Collider[] array2 = array;
				foreach (Collider val in array2)
				{
					if (!Object.op_Implicit((Object)(object)val))
					{
						continue;
					}
					Item val2 = ItemManager.Get(val);
					if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.Creature) && !val2.Creature.IsDead && !list.Contains(val2.Creature))
					{
						list.Add(val2.Creature);
						Vector3 val3 = ((Component)val2).transform.position - point;
						Vector3 normalized = ((Vector3)(ref val3)).normalized;
						val2.Creature.ServerChangeHp(num2);
						if (Object.op_Implicit((Object)(object)val2.Rig))
						{
							val2.Rig.AddForce((normalized + Vector3.up * 0.5f) * 30f, (ForceMode)1);
						}
					}
				}
			}
			catch
			{
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "HasCooldown")]
	internal static class FastShootPatch
	{
		private static bool Prefix(Weapon __instance, ref bool __result)
		{
			if (!Settings.IsUsable || !Settings.FastShoot || !Object.op_Implicit((Object)(object)__instance))
			{
				return true;
			}
			if (!Object.op_Implicit((Object)(object)((Item)__instance).Holder) || !((NetworkBehaviour)((Item)__instance).Holder).Owner.IsLocalClient)
			{
				return true;
			}
			__result = false;
			return false;
		}
	}
	internal static class InventoryExpander
	{
		private static readonly FieldRef<PlayerInventory, List<InventorySlot>> ItemSlotsRef = AccessTools.FieldRefAccess<PlayerInventory, List<InventorySlot>>("_itemSlots");

		private static readonly MethodInfo UpdateInventoryCameraMethod = AccessTools.Method(typeof(PlayerInventory), "UpdateInventoryCamera", (Type[])null, (Type[])null);

		internal static void UnlockMaxSlots()
		{
			if (!Object.op_Implicit((Object)(object)Player.LocalPlayer) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Inventory))
			{
				return;
			}
			PlayerInventory inventory = Player.LocalPlayer.Inventory;
			try
			{
				inventory.UnlockExtraPocket((byte)2);
				inventory._extraSlots.Value = 2;
				List<InventorySlot> list = ItemSlotsRef.Invoke(inventory);
				if (list != null)
				{
					int num = Mathf.Clamp(3 + inventory._extraSlots.Value, 0, list.Count);
					for (int i = 0; i < list.Count; i++)
					{
						if ((Object)(object)list[i] != (Object)null)
						{
							list[i].Initialize(i < num);
						}
					}
				}
				if (UpdateInventoryCameraMethod != null)
				{
					UpdateInventoryCameraMethod.Invoke(inventory, null);
				}
				inventory.LocalTrySelectSlot(0);
				Plugin.WriteLog("[INVENTORY] 已成功激活全部 5 个物品栏 (1~5号槽位全部可用)");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[INVENTORY] 解锁背包异常: " + ex.Message);
			}
		}
	}
	internal static class ItemSpawnerUtility
	{
		internal class SpawnItemEntry
		{
			public string RawKey;

			public string DisplayName;

			public Item Prefab;
		}

		internal enum SpawnerCategory
		{
			Weapons,
			Bosses,
			Creatures,
			Supplies
		}

		private static readonly Dictionary<string, string> ChineseNames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
		{
			{ "assault rifle", "突击步枪 (AR)" },
			{ "pistol", "手枪 (Pistol)" },
			{ "shotgun", "霰弹枪 (Shotgun)" },
			{ "smg", "微型冲锋枪 (SMG)" },
			{ "sniper rifle", "重型狙击枪" },
			{ "knife", "军用匕首" },
			{ "brass knuckles", "近战指虎" },
			{ "fishing rod", "普通钓鱼竿" },
			{ "crab fishing rod", "专业捕蟹竿" },
			{ "dynamite", "烈性炸药 / 雷管" },
			{ "beer", "冰镇啤酒" },
			{ "badball", "弹力球" },
			{ "disc", "复古黑胶唱片" },
			{ "map", "航海地图" },
			{ "radio", "无线电收音机" },
			{ "albatross", "巨型信天翁 (Boss)" },
			{ "blue shark", "远洋蓝鲨 (Boss)" },
			{ "bowhead whale", "巨型弓头鲸 (Boss)" },
			{ "giant piranha", "史前巨型食人鱼 (Boss)" },
			{ "goblin shark", "深海哥布林鲨 (Boss)" },
			{ "mutated bowhead whale", "辐射变异弓头鲸 (Boss)" },
			{ "pufferfish", "狂暴巨型河豚 (Boss)" },
			{ "spidercrab", "深渊巨型蜘蛛蟹 (Boss)" },
			{ "sunfish", "巨型翻车鱼 (Boss)" },
			{ "the old pike", "远古白斑巨狗鱼 (Boss)" },
			{ "tuna", "巨型蓝鳍金枪鱼 (Boss)" },
			{ "seagull", "海鸥" },
			{ "salmon", "大西洋三文鱼" },
			{ "piranha", "热带食人鱼" },
			{ "catfish", "淡水鲶鱼" },
			{ "clownfish", "小丑鱼" },
			{ "eel", "深海电鳗" },
			{ "flying fish", "飞鱼" },
			{ "goldfish", "观赏金鱼" },
			{ "lobster", "澳洲大龙虾" },
			{ "rockcrab", "岩石蟹" },
			{ "browncrab", "棕色面包蟹" },
			{ "seahorse", "海马" },
			{ "shrimp", "对虾" },
			{ "clam", "巨蚌 / 珍珠贝" },
			{ "anglerfish", "深海鮟鱇鱼" },
			{ "blobfish", "忧郁水滴鱼" },
			{ "mackerel", "青花鱼 / 鲭鱼" },
			{ "halibut", "太平洋大比目鱼" },
			{ "needlefish", "尖嘴针鱼" },
			{ "oarfish", "皇带鱼 (地震鱼)" },
			{ "parrotfish", "彩虹鹦嘴鱼" },
			{ "perch", "黄金河鲈" },
			{ "pike", "白斑狗鱼" },
			{ "red snapper", "真红鲷鱼" },
			{ "stonefish", "剧毒石头鱼" },
			{ "tigerfish", "凶猛虎鱼" },
			{ "triggerfish", "热带鳞鲀" },
			{ "sea urchin", "黑海胆" },
			{ "dripper", "潮牌滴水兽" },
			{ "bingbong", "冰棒企鹅鱼" },
			{ "voxel fish", "像素体素鱼" },
			{ "footsnail", "大足海蜗牛" },
			{ "goby", "花纹虾虎鱼" },
			{ "gar", "远古雀鳝" },
			{ "leech", "吸血水蛭" },
			{ "angelfish", "热带神仙鱼" },
			{ "bass", "大口黑鲈" },
			{ "bluegill", "蓝鳃太阳鱼" },
			{ "bowlfish", "圆碗鱼" },
			{ "cod", "大西洋真鳕鱼" },
			{ "superdwarf fish", "超级侏儒鱼" },
			{ "yellow boxfish", "黄木瓜箱鲀" },
			{ "albatrossmeat", "烤信天翁肉" },
			{ "crabmeat", "新鲜蟹肉" },
			{ "piranhameat", "食人鱼肉" },
			{ "pufferfishmeat", "河豚肉" },
			{ "whalemeat", "上等鲸鱼肉" },
			{ "albatross head", "信天翁头标本" },
			{ "giantpiranhaskeleton", "巨型食人鱼骨标本" },
			{ "pufferfish fin", "河豚鱼鳍标本" },
			{ "spidercrab shell", "蜘蛛蟹外壳标本" },
			{ "whale fin", "鲸鱼尾鳍标本" }
		};

		internal static SpawnerCategory CurrentCategory = SpawnerCategory.Weapons;

		internal static readonly List<SpawnItemEntry> WeaponsList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> BossesList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> CreaturesList = new List<SpawnItemEntry>();

		internal static readonly List<SpawnItemEntry> SuppliesList = new List<SpawnItemEntry>();

		internal static bool CacheBuilt = false;

		internal static int SelectedWeaponIdx = 0;

		internal static int SelectedBossIdx = 0;

		internal static int SelectedCreatureIdx = 0;

		internal static int SelectedSupplyIdx = 0;

		internal static int SelectedSightType = 0;

		internal static int SelectedBarrelType = 0;

		internal static int SelectedDamageLevel = 0;

		internal static bool SelectedExtMag = true;

		internal static bool SelectedLaser = true;

		internal static bool SpawnDrip = false;

		internal static bool SpawnDead = false;

		internal static string GetDisplayName(Item item)
		{
			if (!Object.op_Implicit((Object)(object)item))
			{
				return "未知物品";
			}
			try
			{
				string name = item.GetName();
				if (!string.IsNullOrEmpty(name) && !name.StartsWith("#") && name != ((Object)item).name)
				{
					return name;
				}
			}
			catch
			{
			}
			if (ChineseNames.TryGetValue(((Object)item).name.Trim(), out var value))
			{
				return value;
			}
			return ((Object)item).name;
		}

		internal static void EnsureCache()
		{
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			if (CacheBuilt)
			{
				return;
			}
			CacheBuilt = true;
			Item[] array = Resources.LoadAll<Item>("Items");
			if (array == null || array.Length == 0)
			{
				return;
			}
			Item[] array2 = array;
			foreach (Item val in array2)
			{
				if (!Object.op_Implicit((Object)(object)val))
				{
					continue;
				}
				string text = ((Object)val).name.ToLower();
				Weapon obj = ((Component)val).GetComponent<Weapon>() ?? ((Component)val).GetComponentInChildren<Weapon>();
				Creature val2 = ((Component)val).GetComponent<Creature>() ?? ((Component)val).GetComponentInChildren<Creature>();
				SpawnItemEntry item = new SpawnItemEntry
				{
					RawKey = ((Object)val).name,
					DisplayName = GetDisplayName(val),
					Prefab = val
				};
				if ((Object)(object)obj != (Object)null)
				{
					WeaponsList.Add(item);
				}
				else if ((Object)(object)val2 != (Object)null && !val2.ExcludeFromJournal && !val2.IsDrip)
				{
					if ((int)val2.BossType != 0 || text.Contains("shark") || text.Contains("whale") || text.Contains("boss"))
					{
						BossesList.Add(item);
					}
					else
					{
						CreaturesList.Add(item);
					}
				}
				else
				{
					SuppliesList.Add(item);
				}
			}
			WeaponsList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			BossesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			CreaturesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
			SuppliesList.Sort((SpawnItemEntry a, SpawnItemEntry b) => string.CompareOrdinal(a.DisplayName, b.DisplayName));
		}

		internal static string SpawnItem(SpawnItemEntry entry, bool isWeapon)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: 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_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			if (entry == null || !Object.op_Implicit((Object)(object)entry.Prefab))
			{
				return "未选择有效物品";
			}
			Transform val = (Object.op_Implicit((Object)(object)GameInfo.CurCamera) ? ((Component)GameInfo.CurCamera).transform : (Object.op_Implicit((Object)(object)Player.LocalPlayer) ? Player.LocalPlayer.CamObject : null));
			Vector3 val2;
			Quaternion val3;
			if ((Object)(object)val != (Object)null)
			{
				val2 = val.position + val.forward * 2.5f;
				val3 = Quaternion.Euler(0f, val.eulerAngles.y, 0f);
			}
			else
			{
				if (!((Object)(object)Player.LocalPlayer != (Object)null) || !((Object)(object)Player.LocalPlayer.Transform != (Object)null))
				{
					return "本地玩家未处于有效对局中";
				}
				val2 = Player.LocalPlayer.Transform.position + Player.LocalPlayer.Transform.forward * 2f + Vector3.up * 0.5f;
				val3 = Player.LocalPlayer.Transform.rotation;
			}
			Item val4 = Object.Instantiate<Item>(entry.Prefab, val2, val3);
			if (!Object.op_Implicit((Object)(object)val4))
			{
				return "实例化失败";
			}
			if (isWeapon)
			{
				Weapon val5 = ((Component)val4).GetComponent<Weapon>() ?? ((Component)val4).GetComponentInChildren<Weapon>();
				if ((Object)(object)val5 != (Object)null)
				{
					Attachments val6 = val5.Attachments ?? ((Component)val5).GetComponent<Attachments>() ?? ((Component)val5).GetComponentInChildren<Attachments>();
					if ((Object)(object)val6 != (Object)null)
					{
						ApplyWeaponAttachments(val6);
					}
				}
			}
			Creature val7 = ((Component)val4).GetComponent<Creature>() ?? ((Component)val4).GetComponentInChildren<Creature>();
			if ((Object)(object)val7 != (Object)null)
			{
				if (SpawnDrip)
				{
					val7.SetDrip();
				}
				if (SpawnDead)
				{
					val7.ServerKillOnSpawn();
				}
				else
				{
					Bird val8 = (Bird)(((object)((val7 is Bird) ? val7 : null)) ?? ((object)(((Component)val4).GetComponent<Bird>() ?? ((Component)val4).GetComponentInChildren<Bird>())));
					if ((Object)(object)val8 != (Object)null)
					{
						float num = val2.y + Random.Range(8f, 16f);
						AccessTools.PropertySetter(typeof(Bird), "FlyHeigth")?.Invoke(val8, new object[1] { num });
					}
				}
			}
			if ((Object)(object)Server.Instance != (Object)null && ((NetworkBehaviour)Server.Instance).IsServerInitialized)
			{
				((NetworkBehaviour)Server.Instance).Spawn(((Component)val4).gameObject, (NetworkConnection)null, default(Scene));
				Plugin.WriteLog("[SPAWNER] 服务器广播生成: " + entry.DisplayName);
				return "✔ 已成功刷出: " + entry.DisplayName;
			}
			Plugin.WriteLog("[SPAWNER] 本地已生成: " + entry.DisplayName);
			return "✔ 已在准星前生成: " + entry.DisplayName;
		}

		private static void ApplyWeaponAttachments(Attachments att)
		{
			try
			{
				List<Sight> value = Traverse.Create((object)att).Field<List<Sight>>("_sights").Value;
				List<BarrelAttachment> value2 = Traverse.Create((object)att).Field<List<BarrelAttachment>>("_barrelAttachments").Value;
				BulletUpgrade[] value3 = Traverse.Create((object)att).Field<BulletUpgrade[]>("_bulletUpgrades").Value;
				if (value != null && value.Count > 1)
				{
					int num = Mathf.Clamp(SelectedSightType, 0, value.Count - 1);
					if (num > 0 && (Object)(object)value[num] != (Object)null && (Object)(object)((Attachment)value[num]).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value[num]).Info);
					}
				}
				if (value2 != null && value2.Count > 1)
				{
					int num2 = Mathf.Clamp(SelectedBarrelType, 0, value2.Count - 1);
					if (num2 > 0 && (Object)(object)value2[num2] != (Object)null && (Object)(object)((Attachment)value2[num2]).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value2[num2]).Info);
					}
				}
				if (SelectedLaser)
				{
					LaserSight value4 = Traverse.Create((object)att).Field<LaserSight>("_laserSight").Value;
					if ((Object)(object)value4 != (Object)null && (Object)(object)((Attachment)value4).Info != (Object)null)
					{
						att.SetAttachment(((Attachment)value4).Info);
					}
				}
				if (SelectedExtMag)
				{
					AttachmentInfo value5 = Traverse.Create((object)att).Field<AttachmentInfo>("_extendedMagInfo").Value;
					if ((Object)(object)value5 != (Object)null)
					{
						att.SetAttachment(value5);
					}
				}
				if (value3 != null && value3.Length != 0 && SelectedDamageLevel > 0)
				{
					int num3 = Mathf.Clamp(SelectedDamageLevel, 0, value3.Length - 1);
					att._syncedBulletIndex.Value = (byte)num3;
				}
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[SPAWNER] 配件装配异常: " + ex.Message);
			}
		}
	}
	internal static class MeleeSweep
	{
		private static float _lastSweepTime = -99f;

		private const float SweepCooldown = 0.05f;

		internal static void SweepAll(Player attacker, int damage, float force)
		{
			//IL_0051: 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_0056: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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_0113: 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_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			if (!Settings.IsUsable || !Settings.MeleeLongRange || !Object.op_Implicit((Object)(object)attacker) || Time.time - _lastSweepTime < 0.05f)
			{
				return;
			}
			_lastSweepTime = Time.time;
			Transform camObject = attacker.CamObject;
			Vector3 val = (Object.op_Implicit((Object)(object)camObject) ? camObject.position : ((Component)attacker).transform.position);
			Vector3 val2 = (Object.op_Implicit((Object)(object)camObject) ? camObject.forward : ((Component)attacker).transform.forward);
			Creature[] array = Object.FindObjectsByType<Creature>();
			int num = 0;
			Creature[] array2 = array;
			foreach (Creature val3 in array2)
			{
				if (!Object.op_Implicit((Object)(object)val3) || val3.IsDead)
				{
					continue;
				}
				Fish val4 = (Fish)(object)((val3 is Fish) ? val3 : null);
				if (Object.op_Implicit((Object)(object)val4) && Object.op_Implicit((Object)(object)((Item)val4).AttachedRod))
				{
					continue;
				}
				Vector3 aimPoint = Targeting.GetAimPoint(new AimTarget
				{
					Creature = val3
				}, val, val2);
				Vector3 val5 = aimPoint - val;
				Vector3 val6;
				if (!(((Vector3)(ref val5)).sqrMagnitude > 0.0001f))
				{
					val6 = val2;
				}
				else
				{
					val5 = aimPoint - val;
					val6 = ((Vector3)(ref val5)).normalized;
				}
				Vector3 val7 = val6;
				Vector3 val8 = val7 * force;
				if (val8.y < 0f)
				{
					val8.y = 0f;
				}
				try
				{
					((Item)val3).LocalHit(((Component)val3).transform, aimPoint, val7, attacker, damage, false, val8, false);
					num++;
				}
				catch (Exception ex)
				{
					if (Settings.TelemetryEnabled)
					{
						Plugin.WriteLog("[SWEEP] hit failed on " + ((Object)val3).name + ": " + ex.Message);
					}
				}
			}
			Settings.LastSweepCount = num;
			if (Settings.TelemetryEnabled)
			{
				Plugin.WriteLog("[SWEEP] melee sweep hit=" + num + " damage=" + damage);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerPunching), "FindPunchTarget")]
	internal static class PunchSweepPatch
	{
		private static readonly FieldRef<PlayerPunching, Player> PlayerRef = AccessTools.FieldRefAccess<PlayerPunching, Player>("_player");

		private static readonly FieldRef<PlayerPunching, int> DamageRef = AccessTools.FieldRefAccess<PlayerPunching, int>("_damage");

		private static readonly FieldRef<PlayerPunching, float> ForceRef = AccessTools.FieldRefAccess<PlayerPunching, float>("_force");

		private static void Postfix(PlayerPunching __instance, bool extraCheckMidPunch)
		{
			if (!(!Settings.IsUsable || !Settings.MeleeLongRange || extraCheckMidPunch))
			{
				int damage = (ServerSettings.OneShotEnabled ? 99999 : DamageRef.Invoke(__instance));
				MeleeSweep.SweepAll(PlayerRef.Invoke(__instance), damage, ForceRef.Invoke(__instance));
			}
		}
	}
	[HarmonyPatch(typeof(Melee), "FindAttackTarget")]
	internal static class MeleeSweepPatch
	{
		private static readonly FieldRef<Melee, Player> HolderRef = AccessTools.FieldRefAccess<Melee, Player>("_holder");

		private static readonly FieldRef<Melee, float> ForceRef = AccessTools.FieldRefAccess<Melee, float>("_force");

		private static readonly FieldRef<Melee, SharpnessUpgrade[]> SharpnessRef = AccessTools.FieldRefAccess<Melee, SharpnessUpgrade[]>("_sharpnessUpgrades");

		private static void Postfix(Melee __instance, bool extraCheckMidAttack)
		{
			if (Settings.IsUsable && Settings.MeleeLongRange && !extraCheckMidAttack)
			{
				MeleeSweep.SweepAll(HolderRef.Invoke(__instance), ResolveDamage(__instance), ForceRef.Invoke(__instance));
			}
		}

		private static int ResolveDamage(Melee melee)
		{
			if (ServerSettings.OneShotEnabled)
			{
				return 99999;
			}
			try
			{
				SharpnessUpgrade[] array = SharpnessRef.Invoke(melee);
				if (array != null && array.Length != 0)
				{
					int num = melee._syncedSharpnessIndex.Value;
					if (num < 0 || num >= array.Length)
					{
						num = 0;
					}
					return array[num].Damage;
				}
			}
			catch (Exception ex)
			{
				if (Settings.TelemetryEnabled)
				{
					Plugin.WriteLog("[SWEEP] resolve melee damage failed: " + ex.Message);
				}
			}
			return 0;
		}
	}
	[HarmonyPatch(typeof(Creature), "LocalHit")]
	internal static class MeleeOneShotPatch
	{
		private static void Prefix(Creature __instance, Player player, ref int damage, bool rangedHit)
		{
			if (Settings.IsUsable && Settings.MeleeOneShot && Object.op_Implicit((Object)(object)__instance) && !rangedHit && Object.op_Implicit((Object)(object)player) && ((NetworkBehaviour)player).Owner.IsLocalClient)
			{
				int hp = __instance.Hp;
				if (hp > 0)
				{
					damage = hp;
				}
			}
		}
	}
	internal static class NeonTracerManager
	{
		private static Material _cachedNeonMat;

		private static bool _matResolved;

		private static readonly int IdBaseColor = Shader.PropertyToID("_BaseColor");

		private static readonly int IdColor = Shader.PropertyToID("_Color");

		private static readonly int IdEmissionColor = Shader.PropertyToID("_EmissionColor");

		private static Material ResolveNeonMaterial()
		{
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			if (_matResolved && Object.op_Implicit((Object)(object)_cachedNeonMat))
			{
				return _cachedNeonMat;
			}
			_matResolved = true;
			try
			{
				LaserSight[] array = Resources.FindObjectsOfTypeAll<LaserSight>();
				foreach (LaserSight val in array)
				{
					if (Object.op_Implicit((Object)(object)val))
					{
						LineRenderer componentInChildren = ((Component)val).GetComponentInChildren<LineRenderer>(true);
						if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)((Renderer)componentInChildren).sharedMaterial) && Object.op_Implicit((Object)(object)((Renderer)componentInChildren).sharedMaterial.shader))
						{
							_cachedNeonMat = new Material(((Renderer)componentInChildren).sharedMaterial);
							Plugin.WriteLog("[NEON] 已克隆游戏激光瞄准器材质: " + ((Object)((Renderer)componentInChildren).sharedMaterial.shader).name);
							return _cachedNeonMat;
						}
					}
				}
			}
			catch
			{
			}
			string[] array2 = new string[5] { "Universal Render Pipeline/Unlit", "Universal Render Pipeline/Particles/Unlit", "Universal Render Pipeline/Lit", "Sprites/Default", "Legacy Shaders/Particles/Additive" };
			for (int i = 0; i < array2.Length; i++)
			{
				Shader val2 = Shader.Find(array2[i]);
				if ((Object)(object)val2 != (Object)null)
				{
					_cachedNeonMat = new Material(val2);
					return _cachedNeonMat;
				}
			}
			return null;
		}

		internal static void SpawnTracer(Vector3 start, Vector3 end)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.NeonTracersEnabled && !(Vector3.Distance(start, end) < 0.15f))
			{
				new GameObject("NeonBulletTracer").AddComponent<NeonTracerInstance>().Initialize(start, end, ResolveNeonMaterial());
			}
		}

		internal static void ApplyHdrColor(Material mat, Color hdrColor)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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)
			if (Object.op_Implicit((Object)(object)mat))
			{
				if (mat.HasProperty(IdBaseColor))
				{
					mat.SetColor(IdBaseColor, hdrColor);
				}
				if (mat.HasProperty(IdColor))
				{
					mat.SetColor(IdColor, hdrColor);
				}
				try
				{
					mat.EnableKeyword("_EMISSION");
				}
				catch
				{
				}
				if (mat.HasProperty(IdEmissionColor))
				{
					mat.SetColor(IdEmissionColor, hdrColor);
				}
			}
		}
	}
	internal class NeonTracerInstance : MonoBehaviour
	{
		private LineRenderer _line;

		private Material _matInstance;

		private readonly List<Light> _lights = new List<Light>();

		private readonly List<float> _lightBaseIntensity = new List<float>();

		private float _startTime;

		private const float Lifetime = 5f;

		private const float StartWidth = 0.055f;

		private const float EndWidth = 0.04f;

		private static readonly Color NeonCyan = new Color(0.1f, 0.95f, 1f, 1f);

		private static readonly Color NeonMagenta = new Color(1f, 0.12f, 0.8f, 1f);

		internal void Initialize(Vector3 start, Vector3 end, Material sourceMat)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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)
			//IL_00bf: Expected O, but got Unknown
			//IL_00e3: 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)
			_startTime = Time.time;
			_line = ((Component)this).gameObject.AddComponent<LineRenderer>();
			_line.useWorldSpace = true;
			_line.positionCount = 2;
			_line.SetPosition(0, start);
			_line.SetPosition(1, end);
			_line.startWidth = 0.055f;
			_line.endWidth = 0.04f;
			_line.numCapVertices = 4;
			_line.alignment = (LineAlignment)0;
			((Renderer)_line).shadowCastingMode = (ShadowCastingMode)0;
			((Renderer)_line).receiveShadows = false;
			((Renderer)_line).lightProbeUsage = (LightProbeUsage)0;
			if ((Object)(object)sourceMat != (Object)null)
			{
				_matInstance = new Material(sourceMat);
				((Renderer)_line).material = _matInstance;
			}
			ApplyVisual(1f);
			if (Settings.NeonTracerLights)
			{
				CreateLightsAlong(start, end);
			}
			Object.Destroy((Object)(object)((Component)this).gameObject, 5f);
		}

		private void CreateLightsAlong(Vector3 start, Vector3 end)
		{
			//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)
			//IL_0034: 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_0037: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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)
			int num = Mathf.Clamp(Mathf.RoundToInt(Vector3.Distance(start, end) / 3.5f), 1, 6);
			for (int i = 0; i < num; i++)
			{
				float num2 = ((num == 1) ? 0.5f : ((float)i / (float)(num - 1)));
				Vector3 position = Vector3.Lerp(start, end, num2);
				GameObject val = new GameObject("NeonTracerLight_" + i);
				val.transform.SetParent(((Component)this).transform, true);
				val.transform.position = position;
				Light val2 = val.AddComponent<Light>();
				val2.type = (LightType)2;
				val2.color = Color.Lerp(NeonCyan, NeonMagenta, num2);
				val2.range = Settings.NeonLightRange;
				val2.intensity = Settings.NeonLightIntensity;
				val2.shadows = (LightShadows)0;
				val2.renderMode = (LightRenderMode)2;
				_lights.Add(val2);
				_lightBaseIntensity.Add(val2.intensity);
			}
		}

		private void ApplyVisual(float alpha)
		{
			//IL_0059: 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_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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)
			//IL_0044: 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_0056: 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_0067: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: 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)
			//IL_0080: 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_00b1: 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_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			float neonHdrIntensity = Settings.NeonHdrIntensity;
			Color val;
			Color val2;
			if (Settings.NeonRgbRainbow)
			{
				float num = Mathf.Repeat(Time.time * 0.8f, 1f);
				float num2 = Mathf.Repeat(num + 0.35f, 1f);
				val = Color.HSVToRGB(num, 0.9f, 1f);
				val2 = Color.HSVToRGB(num2, 0.9f, 1f);
			}
			else
			{
				val = NeonCyan;
				val2 = NeonMagenta;
			}
			Color val3 = val * neonHdrIntensity * alpha;
			Color val4 = val2 * neonHdrIntensity * alpha;
			val3.a = alpha;
			val4.a = alpha;
			if (Object.op_Implicit((Object)(object)_line))
			{
				_line.startColor = val3;
				_line.endColor = val4;
				float num3 = Mathf.Lerp(0.1f, 1f, alpha);
				_line.startWidth = 0.055f * num3;
				_line.endWidth = 0.04f * num3;
			}
			if (Object.op_Implicit((Object)(object)_matInstance))
			{
				NeonTracerManager.ApplyHdrColor(_matInstance, Color.Lerp(val3, val4, 0.5f));
			}
			for (int i = 0; i < _lights.Count; i++)
			{
				if (Object.op_Implicit((Object)(object)_lights[i]))
				{
					_lights[i].intensity = _lightBaseIntensity[i] * alpha;
					if (Settings.NeonRgbRainbow)
					{
						float num4 = Mathf.Repeat(Time.time * 0.8f + (float)i * 0.15f, 1f);
						_lights[i].color = Color.HSVToRGB(num4, 0.85f, 1f);
					}
				}
			}
		}

		private void Update()
		{
			float num = Time.time - _startTime;
			float alpha = Mathf.Clamp01(1f - num / 5f);
			ApplyVisual(alpha);
		}

		private void OnDestroy()
		{
			if (Object.op_Implicit((Object)(object)_matInstance))
			{
				Object.Destroy((Object)(object)_matInstance);
			}
		}
	}
	internal static class NeumorphismUI
	{
		internal static readonly Color ColorBase = new Color(0.88f, 0.9f, 0.92f, 1f);

		internal static readonly Color ColorElevated = new Color(0.93f, 0.94f, 0.96f, 1f);

		internal static readonly Color ColorShadowDark = new Color(0.7f, 0.72f, 0.75f, 1f);

		internal static readonly Color ColorShadowLight = new Color(1f, 1f, 1f, 0.95f);

		internal static readonly Color ColorAccent = new Color(0.4f, 0.35f, 0.95f, 1f);

		internal static readonly Color ColorAccentBg = new Color(0.78f, 0.76f, 0.96f, 1f);

		internal static readonly Color ColorTextMain = new Color(0.18f, 0.18f, 0.22f, 1f);

		internal static readonly Color ColorTextSub = new Color(0.45f, 0.48f, 0.54f, 1f);

		internal static readonly Color ColorTextAccent = new Color(0.35f, 0.3f, 0.88f, 1f);

		private static Texture2D _whiteTex;

		private static Font _cjkFont;

		private static bool _fontResolved;

		private static GUIStyle _titleStyle;

		private static GUIStyle _subTitleStyle;

		private static GUIStyle _itemTitleStyle;

		private static GUIStyle _itemDescStyle;

		private static GUIStyle _tabStyle;

		private static GUIStyle _tabActiveStyle;

		private static GUIStyle _btnStyle;

		private static GUIStyle _btnActiveStyle;

		private static GUIStyle _smallStyle;

		private static Font SharedFont => ResolveCjkFont() ?? GUI.skin.label.font;

		internal static GUIStyle TitleStyle
		{
			get
			{
				InitStyles();
				return _titleStyle;
			}
		}

		internal static GUIStyle SubTitleStyle
		{
			get
			{
				InitStyles();
				return _subTitleStyle;
			}
		}

		internal static GUIStyle ItemTitleStyle
		{
			get
			{
				InitStyles();
				return _itemTitleStyle;
			}
		}

		internal static GUIStyle ItemDescStyle
		{
			get
			{
				InitStyles();
				return _itemDescStyle;
			}
		}

		internal static GUIStyle TabStyle
		{
			get
			{
				InitStyles();
				return _tabStyle;
			}
		}

		internal static GUIStyle TabActiveStyle
		{
			get
			{
				InitStyles();
				return _tabActiveStyle;
			}
		}

		internal static GUIStyle BtnStyle
		{
			get
			{
				InitStyles();
				return _btnStyle;
			}
		}

		internal static GUIStyle BtnActiveStyle
		{
			get
			{
				InitStyles();
				return _btnActiveStyle;
			}
		}

		internal static GUIStyle SmallStyle
		{
			get
			{
				InitStyles();
				return _smallStyle;
			}
		}

		private static Texture2D GetWhiteTex()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)_whiteTex))
			{
				_whiteTex = new Texture2D(1, 1);
				_whiteTex.SetPixel(0, 0, Color.white);
				_whiteTex.Apply();
			}
			return _whiteTex;
		}

		private static Font ResolveCjkFont()
		{
			if (_fontResolved)
			{
				return _cjkFont;
			}
			_fontResolved = true;
			string[] array = new string[5] { "Microsoft YaHei", "微软雅黑", "SimHei", "SimSun", "Arial" };
			foreach (string text in array)
			{
				try
				{
					Font val = Font.CreateDynamicFontFromOSFont(text, 14);
					if ((Object)(object)val != (Object)null)
					{
						_cjkFont = val;
						Plugin.WriteLog("[UI] 成功加载系统中文字体: " + text);
						return _cjkFont;
					}
				}
				catch
				{
				}
			}
			_cjkFont = Resources.GetBuiltinResource<Font>("LegacyRuntime.ttf") ?? Resources.GetBuiltinResource<Font>("Arial.ttf");
			return _cjkFont;
		}

		private static void InitStyles()
		{
			//IL_0028: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			if (_titleStyle == null || !((Object)(object)_titleStyle.font == (Object)(object)SharedFont))
			{
				Font sharedFont = SharedFont;
				_titleStyle = MakeStyle(sharedFont, 15, (FontStyle)1, (TextAnchor)3, ColorTextMain);
				_subTitleStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextAccent);
				_itemTitleStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)3, ColorTextMain);
				_itemDescStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextSub);
				_tabStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)4, ColorTextSub);
				_tabActiveStyle = MakeStyle(sharedFont, 12, (FontStyle)1, (TextAnchor)4, ColorAccent);
				_btnStyle = MakeStyle(sharedFont, 11, (FontStyle)0, (TextAnchor)4, ColorTextMain);
				_btnActiveStyle = MakeStyle(sharedFont, 11, (FontStyle)1, (TextAnchor)4, ColorAccent);
				_smallStyle = MakeStyle(sharedFont, 10, (FontStyle)0, (TextAnchor)3, ColorTextSub);
			}
		}

		private static GUIStyle MakeStyle(Font font, int size, FontStyle style, TextAnchor anchor, Color color)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: 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_0032: 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)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				font = font,
				fontSize = size,
				fontStyle = style,
				alignment = anchor,
				clipping = (TextClipping)1,
				wordWrap = false
			};
			val.normal.textColor = color;
			return val;
		}

		internal static void DrawSolid(Rect rect, Color col)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: 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)
			Color color = GUI.color;
			GUI.color = col;
			GUI.DrawTexture(rect, (Texture)(object)GetWhiteTex());
			GUI.color = color;
		}

		internal static void DrawSoftShadow(Rect rect, bool isInset, int depth = 3)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: 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_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			Color val = (isInset ? ColorShadowDark : ColorShadowLight);
			Color val2 = (isInset ? ColorShadowLight : ColorShadowDark);
			Color col = default(Color);
			Color col2 = default(Color);
			for (int i = 0; i < depth; i++)
			{
				float num = i + 1;
				float num2 = Mathf.Lerp(0.8f, 0.2f, (float)i / (float)depth);
				((Color)(ref col))..ctor(val.r, val.g, val.b, val.a * num2);
				((Color)(ref col2))..ctor(val2.r, val2.g, val2.b, val2.a * num2);
				if (isInset)
				{
					DrawSolid(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + (float)i, ((Rect)(ref rect)).width - (float)i, 1f), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x + (float)i, ((Rect)(ref rect)).y, 1f, ((Rect)(ref rect)).height - (float)i), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x + (float)i, ((Rect)(ref rect)).yMax - num, ((Rect)(ref rect)).width - (float)i, 1f), col2);
					DrawSolid(new Rect(((Rect)(ref rect)).xMax - num, ((Rect)(ref rect)).y + (float)i, 1f, ((Rect)(ref rect)).height - (float)i), col2);
				}
				else
				{
					DrawSolid(new Rect(((Rect)(ref rect)).x - num, ((Rect)(ref rect)).y - num, ((Rect)(ref rect)).width + num, 1f), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x - num, ((Rect)(ref rect)).y - num, 1f, ((Rect)(ref rect)).height + num), col);
					DrawSolid(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).yMax + (float)i, ((Rect)(ref rect)).width + num, 1f), col2);
					DrawSolid(new Rect(((Rect)(ref rect)).xMax + (float)i, ((Rect)(ref rect)).y, 1f, ((Rect)(ref rect)).height + num), col2);
				}
			}
		}

		internal static void DrawNeumorphicPlate(Rect rect, bool isInset, bool isHover = false)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: 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)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			int depth = (isHover ? 2 : 3);
			Color col = (isInset ? ColorBase : (isHover ? ColorElevated : ColorBase));
			DrawSolid(rect, col);
			DrawSoftShadow(rect, isInset, depth);
		}

		internal static bool DrawTab(Rect rect, string text, bool isSelected)
		{
			//IL_000c: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, isSelected, isHover);
			if (isSelected)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 8f, ((Rect)(ref rect)).yMax - 3f, ((Rect)(ref rect)).width - 16f, 2f), ColorAccent);
			}
			GUI.Label(rect, text, isSelected ? _tabActiveStyle : _tabStyle);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return true;
			}
			return false;
		}

		internal static bool DrawButton(Rect rect, string text, bool isActive = false)
		{
			//IL_000c: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, isActive, isHover);
			if (isActive)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 2f, ((Rect)(ref rect)).y + 4f, 3f, ((Rect)(ref rect)).height - 8f), ColorAccent);
			}
			GUI.Label(rect, text, isActive ? _btnActiveStyle : _btnStyle);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return true;
			}
			return false;
		}

		internal static bool DrawToggleCard(Rect rect, string title, string desc, bool state)
		{
			//IL_000c: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: 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_01d6: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			bool isHover = ((Rect)(ref rect)).Contains(Event.current.mousePosition);
			DrawNeumorphicPlate(rect, state, isHover);
			if (state)
			{
				DrawSolid(new Rect(((Rect)(ref rect)).x + 2f, ((Rect)(ref rect)).y + 4f, 3f, ((Rect)(ref rect)).height - 8f), ColorAccent);
			}
			float num = 42f;
			float num2 = 20f;
			Rect rect2 = default(Rect);
			((Rect)(ref rect2))..ctor(((Rect)(ref rect)).xMax - num - 10f, ((Rect)(ref rect)).y + (((Rect)(ref rect)).height - num2) * 0.5f, num, num2);
			float num3 = ((Rect)(ref rect)).x + 10f;
			float num4 = ((Rect)(ref rect)).width - num - 22f;
			if (string.IsNullOrEmpty(desc))
			{
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + (((Rect)(ref rect)).height - 20f) * 0.5f, num4, 20f), title, _itemTitleStyle);
			}
			else
			{
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + 4f, num4, 18f), title, _itemTitleStyle);
				GUI.Label(new Rect(num3, ((Rect)(ref rect)).y + 24f, num4, 16f), desc, _itemDescStyle);
			}
			DrawSolid(rect2, state ? ColorAccentBg : ColorBase);
			DrawSoftShadow(rect2, isInset: true, 2);
			float num5 = 14f;
			float num6 = (state ? (((Rect)(ref rect2)).xMax - num5 - 3f) : (((Rect)(ref rect2)).x + 3f));
			Rect rect3 = new Rect(num6, ((Rect)(ref rect2)).y + (num2 - num5) * 0.5f, num5, num5);
			DrawSolid(rect3, state ? ColorAccent : ColorElevated);
			DrawSoftShadow(rect3, isInset: false, 2);
			if ((int)Event.current.type == 0 && ((Rect)(ref rect)).Contains(Event.current.mousePosition))
			{
				Event.current.Use();
				return !state;
			}
			return state;
		}

		internal static void DrawTrueCrosshair()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_0081: 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)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			if (Settings.IsUsable && Settings.TrueCrosshairEnabled)
			{
				float num = (float)Screen.width * 0.5f;
				float num2 = (float)Screen.height * 0.5f;
				DrawSolid(new Rect(num - 3f, num2 - 3f, 6f, 6f), new Color(0f, 0f, 0f, 0.7f));
				DrawSolid(new Rect(num - 1.5f, num2 - 1.5f, 3f, 3f), ColorAccent);
				if (Settings.CrosshairShowLines)
				{
					float num3 = 8f;
					float num4 = 5f;
					float num5 = 1.5f;
					DrawSolid(new Rect(num - num3 - num4, num2 - num5 * 0.5f, num3, num5), ColorAccent);
					DrawSolid(new Rect(num + num4, num2 - num5 * 0.5f, num3, num5), ColorAccent);
					DrawSolid(new Rect(num - num5 * 0.5f, num2 - num3 - num4, num5, num3), ColorAccent);
					DrawSolid(new Rect(num - num5 * 0.5f, num2 + num4, num5, num3), ColorAccent);
				}
			}
		}
	}
	internal static class NightModeManager
	{
		private struct LightBackup
		{
			public Color Color;

			public float Intensity;
		}

		private static bool _lastNightState = false;

		private static bool _hasOriginalBackup = false;

		private static Color _origAmbientLight;

		private static float _origAmbientIntensity;

		private static Color _origFogColor;

		private static readonly Dictionary<Light, LightBackup> _origDirLights = new Dictionary<Light, LightBackup>();

		internal static void Update()
		{
			if (Settings.NightMode != _lastNightState)
			{
				_lastNightState = Settings.NightMode;
				if (Settings.NightMode)
				{
					ApplyNightMode();
				}
				else
				{
					RestoreDayMode();
				}
			}
		}

		private static void ApplyNightMode()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: 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_00a2: Invalid comparison between Unknown and I4
			//IL_00b5: 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)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (!_hasOriginalBackup)
				{
					_origAmbientLight = RenderSettings.ambientLight;
					_origAmbientIntensity = RenderSettings.ambientIntensity;
					_origFogColor = RenderSettings.fogColor;
					_hasOriginalBackup = true;
				}
				RenderSettings.ambientLight = new Color(0.015f, 0.025f, 0.06f, 1f);
				RenderSettings.ambientIntensity = 0.25f;
				if (RenderSettings.fog)
				{
					RenderSettings.fogColor = new Color(0.008f, 0.012f, 0.035f, 1f);
				}
				Light[] array = Resources.FindObjectsOfTypeAll<Light>();
				_origDirLights.Clear();
				Light[] array2 = array;
				foreach (Light val in array2)
				{
					if (Object.op_Implicit((Object)(object)val) && (int)val.type == 1)
					{
						_origDirLights[val] = new LightBackup
						{
							Color = val.color,
							Intensity = val.intensity
						};
						val.color = new Color(0.15f, 0.22f, 0.45f, 1f);
						val.intensity = Mathf.Min(val.intensity * 0.22f, 0.28f);
					}
				}
				Plugin.WriteLog("[NIGHT-MODE] \ud83c\udf19 已成功开启赛博黑夜模式!");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[NIGHT-MODE] 开启黑夜模式异常: " + ex.Message);
			}
		}

		private static void RestoreDayMode()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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)
			try
			{
				if (_hasOriginalBackup)
				{
					RenderSettings.ambientLight = _origAmbientLight;
					RenderSettings.ambientIntensity = _origAmbientIntensity;
					RenderSettings.fogColor = _origFogColor;
				}
				foreach (KeyValuePair<Light, LightBackup> origDirLight in _origDirLights)
				{
					if ((Object)(object)origDirLight.Key != (Object)null)
					{
						origDirLight.Key.color = origDirLight.Value.Color;
						origDirLight.Key.intensity = origDirLight.Value.Intensity;
					}
				}
				_origDirLights.Clear();
				Plugin.WriteLog("[NIGHT-MODE] ☀\ufe0f 已恢复原版白昼光照模式!");
			}
			catch (Exception ex)
			{
				Plugin.WriteLog("[NIGHT-MODE] 还原白昼模式异常: " + ex.Message);
			}
		}
	}
	[HarmonyPatch(typeof(Weapon), "Shoot")]
	internal static class NoReloadPatch
	{
		private static readonly FieldRef<Weapon, Attachments> AttachmentsRef = AccessTools.FieldRefAccess<Weapon, Attachments>("_attachments");

		private static readonly FieldRef<Weapon, int> AmmoBackingField = AccessTools.FieldRefAccess<Weapon, int>("<Ammo>k__BackingField");

		private static void Prefix(Weapon __instance)
		{
			if (!Settings.IsUsable || !Settings.NoReload || !Object.op_Implicit((Object)(object)__instance))
			{
				return;
			}
			Attachments val = AttachmentsRef.Invoke(__instance);
			if (Object.op_Implicit((Object)(object)val))
			{
				int ammoPerMag = val.AmmoPerMag;
				if (ammoPerMag > 0 && AmmoBackingField.Invoke(__instance) < ammoPerMag)
				{
					AmmoBackingField.Invoke(__instance) = ammoPerMag;
				}
			}
		}
	}
	[BepInPlugin("com.yourname.fishaimbot", "Fish Aimbot Unified", "5.0.0")]
	public sealed class Plugin : BaseUnityPlugin
	{
		internal static Plugin Instance;

		internal static Harmony Harmony;

		private static Rect _windowRect = new Rect(60f, 60f, 720f, 620f);

		private static bool _isDragging = false;

		private static Vector2 _dragOffset;

		private static bool _isResizing = false;

		private static Vector2 _resizeStartPos;

		private static Vector2 _resizeStartSize;

		private static string _lastSpawnMsg = "";

		private static float _spawnMsgTime;

		private static Vector2 _spawnerScrollPos;

		private void Awake()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			Instance = this;
			Harmony = new Harmony("com.yourname.fishaimbot");
			int num = 0;
			int num2 = 0;
			Type[] types = typeof(Plugin).Assembly.GetTypes();
			foreach (Type type in types)
			{
				if (type.GetCustomAttributes(typeof(HarmonyPatch), inherit: true).Length != 0)
				{
					try
					{
						Harmony.CreateClassProcessor(type).Patch();
						num++;
					}
					catch (Exception ex)
					{
						num2++;
						((BaseUnityPlugin)this).Logger.LogError((object)("补丁失败 " + type.Name + ": " + ex.Message));
					}
				}
			}
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Fish Aimbot Unified v5.0.0 (Official Release / Full Features) loaded (" + num + " 补丁成功). Press F3 to open."));
		}

		internal static void WriteLog(string message)
		{
			if (Settings.TelemetryEnabled && (Object)(object)Instance != (Object)null)
			{
				((BaseUnityPlugin)Instance).Logger.LogInfo((object)message);
			}
		}

		private void Update()
		{
			NightModeManager.Update();
			WeaponSkinGlowManager.Update();
			if (Input.GetKeyDown((KeyCode)284))
			{
				Settings.MenuOpen = !Settings.MenuOpen;
				ItemSpawnerUtility.EnsureCache();
				PlayerCamera.ToggleMouse(Settings.MenuOpen);
			}
			if (Settings.MenuOpen)
			{
				Cursor.lockState = (CursorLockMode)0;
				Cursor.visible = true;
			}
			if (Input.GetKeyDown((KeyCode)286))
			{
				Settings.AutoShootEnabled = !Settings.AutoShootEnabled;
			}
			if (Input.GetKeyDown((KeyCode)290))
			{
				Settings.TelemetryEnabled = !Settings.TelemetryEnabled;
			}
		}

		private static void HandleWindowDragAndResize()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Invalid comparison between Unknown and I4
			//IL_0047: 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_00ac: Invalid comparison between Unknown and I4
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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)
			//IL_0074: 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_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Invalid comparison between Unknown and I4
			//IL_0162: 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)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Invalid comparison between Unknown and I4
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: 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_018f: 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_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			Event current = Event.current;
			Vector2 mousePosition = current.mousePosition;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref _windowRect)).x, ((Rect)(ref _windowRect)).y, ((Rect)(ref _windowRect)).width - 130f, 48f);
			if ((int)current.type == 0 && ((Rect)(ref val)).Contains(mousePosition))
			{
				_isDragging = true;
				_dragOffset = mousePosition - new Vector2(((Rect)(ref _windowRect)).x, ((Rect)(ref _windowRect)).y);
				current.Use();
			}
			else if ((int)current.type == 1 && _isDragging)
			{
				_isDragging = false;
				current.Use();
			}
			else if ((int)current.type == 3 && _isDragging)
			{
				((Rect)(ref _windowRect)).x = Mathf.Clamp(mousePosition.x - _dragOffset.x, 0f, (float)Screen.width - ((Rect)(ref _windowRect)).width);
				((Rect)(ref _windowRect)).y = Mathf.Clamp(mousePosition.y - _dragOffset.y, 0f, (float)Screen.height - ((Rect)(ref _windowRect)).height);
				current.Use();
			}
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(((Rect)(ref _windowRect)).xMax - 24f, ((Rect)(ref _windowRect)).yMax - 24f, 24f, 24f);
			if ((int)current.type == 0 && ((Rect)(ref val2)).Contains(mousePosition))
			{
				_isResizing = true;
				_resizeStartPos = mousePosition;
				_resizeStartSize = new Vector2(((Rect)(ref _windowRect)).width, ((Rect)(ref _windowRect)).height);
				current.Use();
			}
			else if ((int)current.type == 1 && _isResizing)
			{
				_isResizing = false;
				current.Use();
			}
			else if ((int)current.type == 3 && _isResizing)
			{
				Vector2 val3 = mousePosition - _resizeStartPos;
				((Rect)(ref _windowRect)).width = Mathf.Clamp(_resizeStartSize.x + val3.x, 580f, (float)Screen.width - ((Rect)(ref _windowRect)).x);
				((Rect)(ref _windowRect)).height = Mathf.Clamp(_resizeStartSize.y + val3.y, 480f, (float)Screen.height - ((Rect)(ref _windowRect)).y);
				current.Use();
			}
		}

		private void OnGUI()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_1526: Unknown result type (might be due to invalid IL or missing references)
			//IL_1564: Unknown result type (might be due to invalid IL or missing references)
			//IL_1569: Unknown result type (might be due to invalid IL or missing references)
			//IL_1571: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_081e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_08be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0868: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Unknown result type (might be due to invalid IL or missing references)
			//IL_0747: Unknown result type (might be due to invalid IL or missing references)
			//IL_077a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1245: Unknown result type (might be due to invalid IL or missing references)
			//IL_1288: Unknown result type (might be due to invalid IL or missing references)
			//IL_12bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_12fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_090b: Unknown result type (might be due to invalid IL or missing references)
			//IL_095d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_1340: Unknown result type (might be due to invalid IL or missing references)
			//IL_1345: Unknown result type (might be due to invalid IL or missing references)
			//IL_134c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a84: Unknown result type (might be due to invalid IL or missing references)
			//IL_13ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_13e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_1410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0daa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1442: Unknown result type (might be due to invalid IL or missing references)
			//IL_143b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1467: Unknown result type (might be due to invalid IL or missing references)
			//IL_147d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de3: Unknown result type (might be due to invalid IL or missing references)
			//IL_14af: Unknown result type (might be due to invalid IL or missing references)
			//IL_14a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_112e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f94: Unknown result type (might be due to invalid IL or missing references)
			//IL_1188: Unknown result type (might be due to invalid IL or missing references)
			//IL_1008: Unknown result type (might be due to invalid IL or missing references)
			//IL_105d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1090: Unknown result type (might be due to invalid IL or missing references)
			//IL_14e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_14da: Unknown result type (might be due to invalid IL or missing references)
			//IL_1210: Unknown result type (might be due to invalid IL or missing references)
			NeumorphismUI.DrawTrueCrosshair();
			if (!Settings.MenuOpen)
			{
				return;
			}
			GUI.depth = -1000;
			HandleWindowDragAndResize();
			NeumorphismUI.DrawNeumorphicPlate(_windowRect, isInset: false);
			float num = 16f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref _windowRect)).x + num, ((Rect)(ref _windowRect)).y + 10f, ((Rect)(ref _windowRect)).width - num * 2f, 42f);
			GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y + 2f, 320f, 20f), "FISH AIMBOT UNIFIED", NeumorphismUI.TitleStyle);
			GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y + 22f, 320f, 16f), "多功能大一统辅助 · 新拟物软UI v3.3", NeumorphismUI.SubTitleStyle);
			Settings.MasterEnabled = NeumorphismUI.DrawToggleCard(new Rect(((Rect)(ref _windowRect)).xMax - 130f, ((Rect)(ref val)).y + 2f, 114f, 36f), "主控开关", null, Settings.MasterEnabled);
			float num2 = ((Rect)(ref _windowRect)).y + 56f;
			float num3 = (((Rect)(ref _windowRect)).width - num * 2f) / 7f;
			string[] array = new string[7] { "战斗", "生存", "移动", "视觉", "生成", "联机", "状态" };
			for (int i = 0; i < array.Length; i++)
			{
				if (NeumorphismUI.DrawTab(new Rect(((Rect)(ref _windowRect)).x + num + (float)i * num3, num2, num3 - 4f, 32f), array[i], Settings.CurrentTab == (MenuTab)i))
				{
					Settings.CurrentTab = (MenuTab)i;
				}
			}
			float num4 = ((Rect)(ref _windowRect)).height - 146f;
			Rect rect = default(Rect);
			((Rect)(ref rect))..ctor(((Rect)(ref _windowRect)).x + num, num2 + 38f, ((Rect)(ref _windowRect)).width - num * 2f, num4);
			NeumorphismUI.DrawNeumorphicPlate(rect, isInset: true);
			float num5 = ((Rect)(ref rect)).y + 12f;
			float num6 = 46f;
			float num7 = 6f;
			float num8 = 10f;
			float num9 = (((Rect)(ref rect)).width - 24f - num8) * 0.5f;
			float num10 = ((Rect)(ref rect)).x + 12f;
			float num11 = num10 + num9 + num8;
			Rect statusCard;
			float sY;
			float sLineH;
			float sPadding;
			if (Settings.CurrentTab == MenuTab.Combat)
			{
				Settings.BulletTrackingEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "智能子弹追踪 (默认开)", "全向折跃追击目标", Settings.BulletTrackingEnabled);
				Settings.AimEnabled = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "自瞄吸附锁定", "按住右键(M2)吸附", Settings.AimEnabled);
				num5 += num6 + num7;
				if (Settings.BulletTrackingEnabled)
				{
					float num12 = 38f;
					Settings.HeadPriority = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num12), "└ 智能弱点追踪", "有头打头·掩体打露出部位", Settings.HeadPriority);
					num5 += num12 + num7;
				}
				Settings.AutoShootEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "⚡ 自动射击 (F5)", "视线无遮挡时自动极速连发", Settings.AutoShootEnabled);
				Settings.FastShoot = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "极速连射 (狂暴连击)", "解除射击后摇狂暴泼水", Settings.FastShoot);
				num5 += num6 + num7;
				Settings.ExplosiveBullets = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udca5 炸药子弹 (大爆炸)", "受击引爆真实炸药烟雾火光", Settings.ExplosiveBullets);
				Settings.NoRecoil = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "无后坐力", "武器射击零后坐力击退", Settings.NoRecoil);
				num5 += num6 + num7;
				Settings.NoSpread = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "零散布 (绝对精准)", "弹道零散射打在正中心", Settings.NoSpread);
				Settings.TargetBirds = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "锁定飞鸟目标", "海鸥/信天翁等空中目标", Settings.TargetBirds);
				num5 += num6 + num7;
				Settings.TargetTeammates = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "锁定队友 (玩闹模式)", "准星对准联机队友时可锁定", Settings.TargetTeammates);
			}
			else if (Settings.CurrentTab == MenuTab.Survival)
			{
				Settings.GodMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udee1\ufe0f 无限生命 (锁血无敌)", "免疫一切伤害与攻击", Settings.GodMode);
				Settings.InfiniteHunger = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83c\udf57 无限饱食度", "饱食度锁满永远不挨饿", Settings.InfiniteHunger);
				num5 += num6 + num7;
				Settings.KeepInventory = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "死亡不掉落 (双端保全)", "复活后手持与背包物品完整保留", Settings.KeepInventory);
				Settings.NoReload = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "免换弹 (无限弹匣)", "开火前自动填满弹药畅快连发", Settings.NoReload);
				num5 += num6 + num7;
				Settings.MeleeLongRange = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "近战全场群伤", "原地出拳挥刀全图生物受创", Settings.MeleeLongRange);
				Settings.PeacefulSeagulls = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "海鸥和平模式", "海鸥不再偷抢渔获与地面物品", Settings.PeacefulSeagulls);
				num5 += num6 + num7;
				if (Settings.MeleeLongRange)
				{
					float num13 = 38f;
					Settings.MeleeOneShot = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num13), "└ 近战一击必杀", "伤害按目标当前血量直接秒杀", Settings.MeleeOneShot);
					num5 += num13 + num7;
				}
			}
			else if (Settings.CurrentTab == MenuTab.Movement)
			{
				string text = "\ud83c\udfc3 移动速度: " + Settings.MoveSpeedMultiplier.ToString("F1") + "x";
				if (NeumorphismUI.DrawButton(new Rect(num10, num5, num9, num6), text, Settings.MoveSpeedMultiplier > 1f))
				{
					if (Settings.MoveSpeedMultiplier < 1.5f)
					{
						Settings.MoveSpeedMultiplier = 2f;
					}
					else if (Settings.MoveSpeedMultiplier < 2.5f)
					{
						Settings.MoveSpeedMultiplier = 3f;
					}
					else if (Settings.MoveSpeedMultiplier < 4f)
					{
						Settings.MoveSpeedMultiplier = 5f;
					}
					else
					{
						Settings.MoveSpeedMultiplier = 1f;
					}
				}
				string text2 = "\ud83e\udd98 跳跃高度: " + Settings.JumpHeightMultiplier.ToString("F1") + "x";
				if (NeumorphismUI.DrawButton(new Rect(num11, num5, num9, num6), text2, Settings.JumpHeightMultiplier > 1f))
				{
					if (Settings.JumpHeightMultiplier < 1.5f)
					{
						Settings.JumpHeightMultiplier = 2f;
					}
					else if (Settings.JumpHeightMultiplier < 2.5f)
					{
						Settings.JumpHeightMultiplier = 3f;
					}
					else
					{
						Settings.JumpHeightMultiplier = 1f;
					}
				}
				num5 += num6 + num7;
				Settings.FlyMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\udd4a\ufe0f 自由飞天", "空格键上升 / Ctrl键下降", Settings.FlyMode);
				Settings.NoclipMode = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83d\udc7b 穿墙模式", "消除物理碰撞穿越障碍物", Settings.NoclipMode);
				num5 += num6 + num7;
				Settings.FreeShopping = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83d\uded2 购买无视金钱 (零元购)", "商店物品完全免费购买", Settings.FreeShopping);
				Settings.CasinoAlwaysWin = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83c\udfb0 轮盘赌金币必胜", "押注颜色100%获胜翻倍", Settings.CasinoAlwaysWin);
				num5 += num6 + num7;
				if (NeumorphismUI.DrawButton(new Rect(num10, num5, num9, 36f), "\ud83d\udcb0 一键修改金钱 +99999", isActive: true) && (Object)(object)MoneyManager.Instance != (Object)null)
				{
					SyncVar<int> money = MoneyManager.Instance._money;
					money.Value += 99999;
				}
				if (NeumorphismUI.DrawButton(new Rect(num11, num5, num9, 36f), "\ud83c\udf92 一键解锁全部背包 (1~5格)", isActive: true))
				{
					InventoryExpander.UnlockMaxSlots();
				}
				num5 += 42f;
			}
			else if (Settings.CurrentTab == MenuTab.Visuals)
			{
				Settings.NeonTracersEnabled = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "5秒发光霓虹激光", "开火生成静止发光高亮激光束渐隐淡出", Settings.NeonTracersEnabled);
				Settings.TrueCrosshairEnabled = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "真·中心点准星", "屏幕物理正中心高对比度激光瞄准点", Settings.TrueCrosshairEnabled);
				num5 += num6 + num7;
				if (Settings.TrueCrosshairEnabled)
				{
					float num14 = 38f;
					Settings.CrosshairShowLines = NeumorphismUI.DrawToggleCard(new Rect(num11 + 16f, num5, num9 - 16f, num14), "└ 准星十字辅助线", "在中心点外侧渲染四向发光指示线", Settings.CrosshairShowLines);
					num5 += num14 + num7;
				}
				Settings.NightMode = NeumorphismUI.DrawToggleCard(new Rect(num10, num5, num9, num6), "\ud83c\udf19 赛博黑夜模式", "切换为幽冷暗夜环境(配合霓虹大片感)", Settings.NightMode);
				Settings.WeaponSkinGlow = NeumorphismUI.DrawToggleCard(new Rect(num11, num5, num9, num6), "\ud83d\udca1 武器皮肤自适应发光", "枪械与匕首按皮肤配色自发光", Settings.WeaponSkinGlow);
				num5 += num6 + num7;
				if (Settings.WeaponSkinGlow)
				{
					float num15 = 38f;
					Settings.WeaponSkinGlowLight = NeumorphismUI.DrawToggleCard(new Rect(num10 + 16f, num5, num9 - 16f, num15), "└ 武器环境流光灯", "动态照亮手部与周围环境", Settings.