Decompiled source of BoomThisHowToFish v1.5.1

HowToFish.Trainer.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using FishNet.Object;
using FishNet.Transporting;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("HowToFish.Trainer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HowToFish.Trainer")]
[assembly: AssemblyTitle("HowToFish.Trainer")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[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 HowToFishTrainer
{
	[HarmonyPatch(typeof(PlayerAimAssist), "IsAimingDownSights")]
	internal static class AimWithoutAdsPatch
	{
		private static bool Prefix(ref bool __result)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance == (Object)null || !instance.AimWithoutAdsEnabled || !Object.op_Implicit((Object)(object)Player.LocalPlayer) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Holding) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Holding.HeldItem) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Holding.HeldItem.Weapon))
			{
				return true;
			}
			__result = true;
			return false;
		}
	}
	[HarmonyPatch(typeof(PlayerAimAssist), "GetRotationDelta")]
	internal static class ConfigurableAimAssistPatch
	{
		private static bool Prefix(Vector3 cameraPosition, Vector3 cameraEuler, float manualLookAmount, ref Vector2 __result)
		{
			//IL_0011: 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_0052: 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_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_004f: Unknown result type (might be due to invalid IL or missing references)
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance == (Object)null || !instance.TryGetAimRotationDelta(cameraPosition, cameraEuler, manualLookAmount, out var delta))
			{
				return true;
			}
			float num = 2.5f;
			if (((Vector2)(ref delta)).magnitude > num)
			{
				delta = ((Vector2)(ref delta)).normalized * num;
			}
			__result = delta;
			return false;
		}
	}
	[HarmonyPatch(typeof(CreatureManager), "HookItem")]
	internal static class ForcedCatchPatch
	{
		private static void Prefix(ref Item itemPrefab)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance != (Object)null)
			{
				itemPrefab = instance.GetForcedCatchItem(itemPrefab);
			}
		}

		private static void Postfix(Bait bait)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if (!((Object)(object)instance == (Object)null))
			{
				instance.ApplyForcedCatchResult(bait);
			}
		}
	}
	[HarmonyPatch(typeof(DeadPlayer), "UpdateResurrection")]
	internal static class InfiniteSlapPatch
	{
		private static bool Prefix(DeadPlayer __instance)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			return (Object)(object)instance == (Object)null || !instance.TryRunInfiniteSlap(__instance);
		}
	}
	[HarmonyPatch(typeof(PlayerVitals), "TakeDamage")]
	internal static class LocalHostGodModePatch
	{
		private static bool Prefix(PlayerVitals __instance)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			return (Object)(object)instance == (Object)null || !instance.SelfGodEnabled || !Object.op_Implicit((Object)(object)Player.LocalPlayer) || (Object)(object)__instance != (Object)(object)Player.LocalPlayer.Vitals || !((NetworkBehaviour)__instance).IsServerInitialized;
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectiles")]
	internal static class MagicBulletMultiplePatch
	{
		private static void Prefix(Player owner, WeaponInfo weaponInfo, bool isLocal, Vector3 pos, Vector3[] velocities)
		{
			//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_003d: 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)
			TrainerPlugin instance = TrainerPlugin.Instance;
			if (!((Object)(object)instance == (Object)null) && velocities != null)
			{
				for (int i = 0; i < velocities.Length; i++)
				{
					Vector3 velocity = velocities[i];
					instance.RedirectMagicBullet(owner, weaponInfo, isLocal, pos, ref velocity);
					velocities[i] = velocity;
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileManager), "AddProjectile")]
	internal static class MagicBulletSinglePatch
	{
		private static void Prefix(Player owner, WeaponInfo weaponInfo, bool isLocal, Vector3 pos, ref Vector3 velocity)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			TrainerPlugin instance = TrainerPlugin.Instance;
			if (!((Object)(object)instance == (Object)null))
			{
				instance.RedirectMagicBullet(owner, weaponInfo, isLocal, pos, ref velocity);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerMovement), "FixedUpdate")]
	internal static class PlayerFlightPatch
	{
		private static void Postfix(PlayerMovement __instance)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if (!((Object)(object)instance == (Object)null))
			{
				instance.ApplyFlightAfterPhysics(__instance);
			}
		}
	}
	[HarmonyPatch(typeof(CasinoManager), "ServerRouletteResult")]
	internal static class RouletteAlwaysWinPatch
	{
		private static void Prefix(ref BetColor winColor)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected I4, but got Unknown
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance != (Object)null)
			{
				winColor = (BetColor)(int)instance.GetForcedRouletteColor(winColor);
			}
		}
	}
	[HarmonyPatch(typeof(Item), "AddBetMultiplier")]
	internal static class RoulettePayoutPatch
	{
		private static void Prefix(ref float multiplier)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance != (Object)null)
			{
				multiplier = instance.GetRoulettePayout(multiplier);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerAimAssist), "CanUseAimAssist")]
	internal static class StrongAimAssistPatch
	{
		private static bool Prefix(ref bool __result)
		{
			TrainerPlugin instance = TrainerPlugin.Instance;
			if ((Object)(object)instance == (Object)null || !instance.StrongAimEnabled || !Object.op_Implicit((Object)(object)Player.LocalPlayer))
			{
				return true;
			}
			__result = true;
			return false;
		}
	}
	[BepInPlugin("cn.yux.howtofish.trainer", "Boom This HowToFish - By Me0wws", "1.5.1")]
	public sealed class TrainerPlugin : BaseUnityPlugin
	{
		private struct SkinEntry
		{
			public byte ItemId;

			public byte SkinId;

			public string Display;
		}

		private struct AimCandidate
		{
			public Transform Target;

			public Vector3 Position;

			public Vector3 Velocity;
		}

		private struct MovementDefaults
		{
			public float Walk;

			public float Sprint;

			public float Jump;
		}

		private struct AimDefaults
		{
			public float Distance;

			public float AcquireAngle;

			public float BreakAngle;

			public float RotationSpeed;

			public float Sharpness;
		}

		private struct WeaponDefaults
		{
			public Weapon Weapon;

			public float ShotDelay;

			public float Spread;

			public int Recoil;

			public float ProjectileSpeed;

			public int ProjectileCount;

			public bool FullAuto;

			public bool NoShootDuringAnimation;

			public bool NoQueueingShots;
		}

		private struct RodDefaults
		{
			public FishingRod Rod;

			public float ReelSpeed;

			public float ReelStep;

			public float ThrowSpeed;
		}

		private struct BoatMotorDefaults
		{
			public BoatMotor Motor;

			public float Force;
		}

		private struct BaitDefaults
		{
			public BaitInfo Bait;

			public Vector2 CatchTime;

			public float LostChance;

			public bool RequireReeling;
		}

		private sealed class KeyBinding
		{
			public readonly string Label;

			public readonly string FieldName;

			public ConfigEntry<KeyCode> Config;

			public KeyBinding(string label, string fieldName)
			{
				Label = label;
				FieldName = fieldName;
			}
		}

		internal static TrainerPlugin Instance;

		private bool _useEnglish = true;

		private readonly Dictionary<string, Dictionary<string, string>> _localizationDict = new Dictionary<string, Dictionary<string, string>>
		{
			{
				"zh",
				new Dictionary<string, string>
				{
					{ "menu.title", "Boom This HowToFish - By Me0wws" },
					{ "menu.opened", "菜单已打开(F1 关闭)" },
					{ "menu.closed", "菜单已关闭" },
					{ "menu.player", "玩家: " },
					{ "menu.none", "无" },
					{ "menu.money", "金钱: " },
					{ "menu.categories", "功能分类" },
					{ "menu.scope", "作用范围" },
					{ "menu.scope_desc", "Thanks for HsJohnL\n[本地] 仅当前客户端\n[同步] 服务器复制结果\n[主机] 房主权威\n[全局] 整个房间规则" },
					{ "menu.close_hint", "F1 关闭" },
					{ "menu.lang", "语言: 中文" },
					{ "menu.lang_switch", "切换英文" },
					{ "status.host", "主机/服务器" },
					{ "status.client", "联机客户端" },
					{ "status.none", "未进入世界" },
					{ "status.godmode", "全局无敌=" },
					{ "status.oneshot", "全局一击模式=" },
					{ "status.move", "移动倍数=" },
					{ "status.jump", "跳跃倍数=" },
					{ "status.move_reset", "移动参数已重置" },
					{ "tab.player", "玩家 / 资源" },
					{ "tab.items", "物品 / 背包" },
					{ "tab.teammates", "队友 / 世界" },
					{ "tab.combat", "战斗 / 钓鱼" },
					{ "tab.esp", "透视 / 自瞄 / 准星" },
					{ "tab.casino", "赌博 / 命令" },
					{ "tab.other", "其他 / 设置" },
					{ "desc.player", "金钱、状态、无敌及移动参数" },
					{ "desc.items", "生成物品、解锁背包并编辑手持物" },
					{ "desc.teammates", "队友互动、复活、飞行、传送与世界进度" },
					{ "desc.combat", "枪械、附件、鱼竿、鱼饵及上钩物参数" },
					{ "desc.esp", "实体透视、自瞄瞄准及准星自定义" },
					{ "desc.casino", "轮盘、老虎机及游戏原生命令" },
					{ "desc.other", "更多玩家、房间设置及其他辅助功能" },
					{ "card.money", "金钱" },
					{ "card.money_desc", "共享服务器资源,修改需要房主权限" },
					{ "card.vitals", "生命与状态" },
					{ "card.movement", "移动参数" },
					{ "card.movement_desc", "拥有者本地计算,位置仍会同步" },
					{ "card.items", "物品库与生成" },
					{ "card.items_desc", "按名称、ID、类型或价值筛选;点击条目生成到手中" },
					{ "card.held", "持有物编辑" },
					{ "card.held_desc", "当前持有:" },
					{ "card.skins", "皮肤 ID 与快速解锁" },
					{ "card.skins_desc", "皮肤 ID 按物品分别编号;船皮肤使用物品 ID 255。解锁写入本地存档。" },
					{ "card.teleport", "坐标与传送" },
					{ "card.teleport_desc", "自己的角色由服务器确认并同步" },
					{ "card.world", "世界进度" },
					{ "card.world_desc", "主机权威,影响当前房间与存档" },
					{ "card.boat", "船只参数" },
					{ "card.teammates", "队友互动" },
					{ "card.teammates_desc", "选择玩家后可双向传送、恶搞位置或赠送物品,结果同步到房间" },
					{ "card.revive", "复活与异常状态" },
					{ "card.slap", "扇巴掌恶搞" },
					{ "card.slap_desc", "选择倒地队友并拿起其身体;持续扇模式会循环动画且不会完成复活。" },
					{ "card.flight", "飞行" },
					{ "card.flight_desc", "WASD 水平移动,Space 上升,Ctrl 下降" },
					{ "card.weapon", "枪械参数" },
					{ "card.weapon_desc", "持有武器在本地改参数,射击结果沿原 RPC 同步" },
					{ "card.fishing", "钓竿、鱼饵与上钩物" },
					{ "card.equipped", "当前装备与升级" },
					{ "card.equipped_desc", "当前持有:" },
					{ "card.esp", "透视" },
					{ "card.esp_desc", "本地绘制,不改变实体;实体类型与框体组件均可独立配置" },
					{ "card.aim", "自瞄" },
					{ "card.aim_desc", "按准星夹角优先选择;队友目标点使用头部/摄像机代理位置" },
					{ "card.crosshair", "准星设置" },
					{ "card.crosshair_desc", "自定义准星样式、颜色、大小等参数" },
					{ "card.roulette", "轮盘参数" },
					{ "card.roulette_desc", "结果由主机处理" },
					{ "card.slots", "老虎机奖品" },
					{ "card.slots_desc", "指定下一次奖品的物品与皮肤" },
					{ "card.commands", "游戏原生命令" },
					{ "card.commands_desc", "主机命令;输入完整命令后执行" },
					{ "card.commands_help", "命令帮助" },
					{ "card.max_players", "更多玩家" },
					{ "card.max_players_desc", "修改房间最大玩家数,仅房主生效。修改后需重新创建房间。" },
					{ "card.lobby", "房间设置" },
					{ "card.lobby_desc", "快速切换房间公开/私密状态" },
					{ "card.performance", "性能设置" },
					{ "card.performance_desc", "调整游戏性能相关选项" },
					{ "card.quick", "快捷操作" },
					{ "card.quick_desc", "常用游戏操作快捷按钮" },
					{ "btn.add", "[主机] 增加" },
					{ "btn.remove", "[主机] 减少" },
					{ "btn.set", "[主机] 设为此值" },
					{ "btn.fill_vitals", "[主机] 生命/饱食全满,清除中毒/燃烧" },
					{ "btn.godmode_global", "[主机/全局] 原生无敌: " },
					{ "btn.oneshot", "[主机/全局] 一击模式: " },
					{ "btn.apply", "应用" },
					{ "btn.reset", "重置" },
					{ "btn.refresh_items", "刷新全部物品 ID" },
					{ "btn.clear_filter", "清空筛选" },
					{ "btn.unlock_baits", "[同步/自己] 解锁全部鱼饵" },
					{ "btn.unlock_pockets", "[主机/自己] 解锁全部背包槽" },
					{ "btn.spawn", "[同步] 生成到手中" },
					{ "btn.prev", "上一页" },
					{ "btn.next", "下一页" },
					{ "btn.set_weight", "[主机] 设置重量" },
					{ "btn.raw", "生食" },
					{ "btn.perfect", "完美熟度" },
					{ "btn.burnt", "烤焦" },
					{ "btn.next_skin", "[同步] 下个皮肤" },
					{ "btn.kill_mult", "[同步] 击杀分倍率" },
					{ "btn.bet_mult", "[主机] 下注价值倍率" },
					{ "btn.unlock_all_skins", "[本地存档] 解锁全部物品/船皮肤" },
					{ "btn.unlock_clothes", "[本地/当前会话] 解锁全部角色服装" },
					{ "btn.unlock_skin", "解锁指定皮肤" },
					{ "btn.unlock", "[本地存档] 解锁" },
					{ "btn.teleport", "[同步] 传送" },
					{ "btn.save_pos", "记录当前位置" },
					{ "btn.return_pos", "[同步] 返回记录点" },
					{ "btn.forward", "[同步] 向视线前方 10m" },
					{ "btn.to_boat", "[同步] 传送到船" },
					{ "btn.unlock_boat", "[主机] 解锁船/雷达/最高马达" },
					{ "btn.unlock_grill", "[主机] 解锁烤架" },
					{ "btn.prev_island", "[主机/全局] 上一个岛" },
					{ "btn.next_island", "[主机/全局] 下一个岛" },
					{ "btn.apply_mult", "应用倍率" },
					{ "btn.pull_here", "[同步] 拉到我身边" },
					{ "btn.go_to_teammate", "[同步] 我传送到队友" },
					{ "btn.throw_forward", "[同步] 丢到视线前 10m" },
					{ "btn.give_item", "[同步] 免费塞到队友手中" },
					{ "btn.revive", "[同步] 复活选中队友" },
					{ "btn.revive_all", "[同步] 一键复活全员" },
					{ "btn.clear_self", "[主机] 清除自己异常" },
					{ "btn.clear_teammate", "[主机] 清除队友异常" },
					{ "btn.apply_rod", "应用鱼竿参数" },
					{ "btn.apply_catch", "应用上钩参数" },
					{ "btn.max_attachments", "[主机/同步] 枪械全部附件" },
					{ "btn.max_bullets", "[主机/同步] 弹头升满" },
					{ "btn.max_melee", "[主机/同步] 近战锐度升满" },
					{ "btn.apply_aim", "应用自瞄参数" },
					{ "btn.apply_roulette", "应用轮盘参数" },
					{ "btn.set_prize", "[主机] 指定奖品" },
					{ "btn.random_prize", "[主机] 恢复随机" },
					{ "btn.execute", "[主机] 执行" },
					{ "btn.public", "设为公开房间" },
					{ "btn.private", "设为私密房间" },
					{ "btn.unlimited", "无限制" },
					{ "btn.quit", "退出到主菜单" },
					{ "btn.reload", "重载游戏场景" },
					{ "btn.select_all", "全部选中" },
					{ "btn.deselect_all", "全部取消" },
					{ "btn.invert_select", "反选" },
					{ "toggle.godmode", "[主机/自己] 个人无敌" },
					{ "toggle.keep_full", "[主机/自己] 持续满生命、饱食,清毒/火" },
					{ "toggle.infinite_ammo", "[本地] 无限弹药" },
					{ "toggle.no_spread", "[本地] 无散布 + 无后坐击退" },
					{ "toggle.rapid_fire", "[本地] 射击间隔 ×0.12" },
					{ "toggle.skip_bolt", "[本地] 跳过拉栓/开火动画限制" },
					{ "toggle.force_auto", "[本地] 强制全自动(按住射击;可搭配快速射击)" },
					{ "toggle.custom_weapon", "[本地/同步伤害] 启用自定义枪械参数" },
					{ "toggle.fast_fishing", "[本地/同步运动] 收线、线长步进、抛线速度 ×6" },
					{ "toggle.instant_bite", "[主机] 0.1–0.2 秒咬钩、鱼饵零损耗、无需收线触发" },
					{ "toggle.custom_rod", "[本地/同步运动] 启用自定义鱼竿参数" },
					{ "toggle.force_catch", "[主机] 指定下一次/持续上钩物品" },
					{ "toggle.shiny", "强制闪光品质" },
					{ "toggle.esp", "[本地] 启用透视" },
					{ "toggle.players", "队友" },
					{ "toggle.alive", "活体生物" },
					{ "toggle.dead", "死亡生物" },
					{ "toggle.items", "普通物品" },
					{ "toggle.boxes", "实体框" },
					{ "toggle.corners", "角框" },
					{ "toggle.healthbars", "血条" },
					{ "toggle.snaplines", "引导线" },
					{ "toggle.strong_aim", "[本地] 强力辅助瞄准(鼠标也生效)" },
					{ "toggle.no_ads", "[本地] 自瞄无需按住瞄准键" },
					{ "toggle.sticky", "[本地] 锁定当前目标,减少移动时跳目标" },
					{ "toggle.predict", "[本地] 移动预测(目标/自己移动时提前量)" },
					{ "toggle.magic", "[本地/同步命中] 魔法子弹(射击时自动修正弹道)" },
					{ "toggle.ignore", "忽略遮挡" },
					{ "toggle.outline", "显示描边" },
					{ "toggle.spread_ring", "显示扩散圈" },
					{ "toggle.roulette_win", "[主机] 当前下注颜色必中" },
					{ "toggle.roulette_payout", "[主机] 自定义赔付倍率" },
					{ "toggle.auto_slap", "[同步] 持续扇选中队友(不复活)" },
					{ "toggle.fast_slap", "[本地/同步] 加速正常扇巴掌复活" },
					{ "toggle.flight", "[本地] 飞行" },
					{ "toggle.boat_boost", "[主机/全局] 船马达加速" },
					{ "label.move_mult", "移动倍数" },
					{ "label.jump_mult", "跳跃倍数" },
					{ "label.items_count", "物品表:{0} 项匹配,共 {1} 页。点击后免费生成到手中并同步。" },
					{ "label.page", "第 {0} / {1} 页" },
					{ "label.item_id", "物品 ID" },
					{ "label.skin_id", "皮肤 ID" },
					{ "label.skins_count", "皮肤表:{0} 项匹配。格式:物品 ID / 皮肤 ID / 名称 / 稀有度" },
					{ "label.coords", "当前坐标:X {0}  Y {1}  Z {2}" },
					{ "label.selected", "当前选择:" },
					{ "label.downed", " [倒地]" },
					{ "label.holding", "● 已拿起选中队友" },
					{ "label.waiting", "○ 等待拿起选中队友" },
					{ "label.speed", "速度" },
					{ "label.speed_mult", "速度倍率" },
					{ "label.sniper_tip", "狙击枪建议同时开启:跳过拉栓 + 强制全自动 + 射击间隔 ×0.12。" },
					{ "label.delay", "间隔×" },
					{ "label.speed_param", "弹速×" },
					{ "label.count", "弹丸数" },
					{ "label.spread", "散布×" },
					{ "label.recoil", "后坐×" },
					{ "label.damage", "伤害×" },
					{ "label.reel", "收线×" },
					{ "label.step", "线长步进×" },
					{ "label.throw", "抛线×" },
					{ "label.weight", "重量/大小" },
					{ "label.ammo", "武器弹药:" },
					{ "label.damage_colon", " | 伤害:" },
					{ "label.rod_detected", "已检测到钓鱼竿。" },
					{ "label.distance", "距离" },
					{ "label.box_style", "框体样式:" },
					{ "label.esp_color_tip", "颜色:青=队友,绿=活体,红=死亡,黄=物品;标签显示名称、距离及生命/重量。" },
					{ "label.target_type", "目标类型:" },
					{ "label.aim_params", "距离 / 捕获角 / 转速" },
					{ "label.sharpness", "跟随强度 / 预测倍率" },
					{ "label.magic_tip", "魔法子弹沿用上方目标类型;无需准星对准目标。" },
					{ "label.mode", "模式" },
					{ "label.current", "当前: " },
					{ "label.style", "样式" },
					{ "label.current_style", "当前样式: " },
					{ "label.color", "颜色" },
					{ "label.custom", "自定义(#)" },
					{ "label.size", "大小" },
					{ "label.thickness", "粗细" },
					{ "label.gap", "间距" },
					{ "label.t_length", "T长" },
					{ "label.current_color", "当前准星颜色: " },
					{ "label.red_black", "红/黑倍率" },
					{ "label.green", "绿色倍率" },
					{ "label.commands_help_title", "所有命令及说明:" },
					{ "label.commands_list", "spawn / spawndead / spawndrip / grill / boat / addmoney / removemoney / nextisland / previsland / godmode / oneshot / killboss / allskins / noskins / finishgame / unlockachievements / lockachievements" },
					{ "label.command_example", "示例:/spawn fishingrod   /spawndead piranha   /addmoney   /godmode" },
					{ "label.commands_help_detail", "┌─────────────────────────────────────────────────────────┐\n│ 命令                           │ 说明                      │\n├─────────────────────────────────────────────────────────┤\n│ spawn <物品名>                 │ 生成指定物品              │\n│ spawndead <生物名>             │ 生成死亡生物              │\n│ spawndrip <生物名>             │ 生成闪光生物              │\n│ grill                          │ 解锁烤架                  │\n│ boat                           │ 解锁船/雷达/最高马达      │\n│ addmoney <金额>                │ 增加金钱                  │\n│ removemoney <金额>             │ 减少金钱                  │\n│ nextisland                     │ 切换到下一个岛屿          │\n│ previsland                     │ 切换到上一个岛屿          │\n│ godmode                        │ 切换全局无敌模式          │\n│ oneshot                        │ 切换全局一击模式          │\n│ killboss                       │ 击杀当前区域Boss          │\n│ allskins                       │ 解锁所有皮肤              │\n│ noskins                        │ 移除所有皮肤              │\n│ finishgame                     │ 完成游戏                  │\n│ unlockachievements             │ 解锁所有成就              │\n│ lockachievements               │ 锁定所有成就              │\n└─────────────────────────────────────────────────────────┘" },
					{ "label.max_players", "最大玩家数" },
					{ "label.current_fmt", "(当前: {0})" },
					{ "label.max_players_tip", "提示: 更改后需要重新创建房间 (退出到主菜单再重新进入) 才能生效。" },
					{ "label.lobby_status", "当前状态: " },
					{ "label.public", "公开" },
					{ "label.private", "私密" },
					{ "label.fps_limit", "帧率上限" },
					{ "label.current_fps", "当前帧率: {0} FPS" },
					{ "label.team_select", "队友选择自瞄" },
					{ "label.team_mode_desc", "当前模式: " },
					{ "label.team_count", "共 {0} 名队友, 已选 {1} 名" },
					{ "style.dot", "小点" },
					{ "style.cross", "十字" },
					{ "style.t", "T型" },
					{ "style.circle", "圆圈" },
					{ "style.dot_circle", "点圈" },
					{ "style.crosshair", "准星" },
					{ "color.white", "白色" },
					{ "color.red", "红色" },
					{ "color.green", "绿色" },
					{ "color.blue", "蓝色" },
					{ "color.cyan", "青色" },
					{ "color.yellow", "黄色" },
					{ "status.host_required", "该操作需要主机且本地玩家已生成" },
					{ "status.added_money", "增加金钱 " },
					{ "status.removed_money", "减少金钱 " },
					{ "status.money_set", "金钱已设为 " },
					{ "status.vitals_filled", "生命/饱食已全满,中毒/燃烧已清除" },
					{ "status.teleporting", "已请求传送 " },
					{ "status.to", " -> " },
					{ "status.invalid_id", "物品 ID 无效:" },
					{ "status.giving", "已请求给 " },
					{ "status.no_revive_target", "目标当前没有可复活的倒地实体" },
					{ "status.reviving", "已请求复活 " },
					{ "status.revive_all", "已提交全员复活:" },
					{ "status.cleared", "已清除异常状态:" },
					{ "status.aim_applied", "自瞄参数已应用" },
					{ "status.weapon_applied", "自定义枪械参数已应用" },
					{ "status.rod_applied", "自定义鱼竿参数已应用" },
					{ "status.catch_set", "上钩物设为 " },
					{ "status.roulette_applied", "轮盘赔付参数已应用" },
					{ "status.invalid_skin", "物品 ID 或皮肤索引无效" },
					{ "status.slot_prize", "下次老虎机奖品已指定:" },
					{ "status.random_prize", "老虎机已恢复随机奖品" },
					{ "status.command_submitted", "命令已提交:" },
					{ "status.command_invalid", "命令格式未识别:" },
					{ "status.items_refreshed", "物品表已刷新,共 " },
					{ "status.skin_not_found", "未找到该物品 ID / 皮肤 ID 组合" },
					{ "status.skin_unlocked", "皮肤已解锁:" },
					{ "status.all_skins_unlocked", "已写入本地存档,共解锁皮肤 " },
					{ "status.clothes_unlocked", "全部角色服装已在当前会话解锁" },
					{ "status.server_required", "需要已连接的服务器与本地玩家" },
					{ "status.spawning", "已请求生成 " },
					{ "status.baits_unlocked", "已提交全部鱼饵解锁,共 " },
					{ "status.pockets_unlocked", "额外背包槽已设为 5" },
					{ "status.weight_set", "持有物重量已设为 " },
					{ "status.cookness_set", "持有物熟度已设为 " },
					{ "status.no_skin", "该物品没有可切换皮肤" },
					{ "status.skin_switched", "请求切换持有物皮肤到 " },
					{ "status.kill_mult_set", "击杀分倍率已提交:" },
					{ "status.bet_mult_set", "下注价值倍率已设为 " },
					{ "status.attachments_applied", "枪械附件已应用:" },
					{ "status.bullet_upgraded", "弹头升级次数:" },
					{ "status.melee_upgraded", "近战锐度升级次数:" },
					{ "status.teleporting_to", "已请求传送到 " },
					{ "status.boat_required", "需要主机且船实例已生成" },
					{ "status.boat_unlocked", "船、雷达与最高马达已解锁" },
					{ "status.max_players_set", "最大玩家数已设置为 " },
					{ "status.lobby_set", "房间已设为 " },
					{ "status.no_lobby", "无法获取当前房间信息" },
					{ "status.error", "失败: " },
					{ "status.fps_limit", "帧率上限已设为 " },
					{ "status.fps_unlimited", "帧率限制已解除 (无限制)" },
					{ "status.quitting", "正在退出到主菜单..." },
					{ "status.loading_main", "正在加载主菜单..." },
					{ "status.reloading", "正在重载场景: " },
					{ "status.saved_pos", "已记录 " },
					{ "status.no_boat", "当前没有船实例" },
					{ "status.grill_unlocked", "烤架已解锁" },
					{ "status.prev_island", "请求切换到上一个岛" },
					{ "status.next_island", "请求切换到下一个岛" },
					{ "status.boat_mult", "船速倍率=" },
					{ "status.slap_speed", "扇巴掌速度倍率=" },
					{ "status.flight_speed", "飞行速度=" },
					{ "status.esp_distance", "透视距离=" },
					{ "status.crosshair_mode", "准星模式: " },
					{ "status.crosshair_style", "准星样式: " },
					{ "status.crosshair_color", "准星颜色: " },
					{ "status.crosshair_size", "准星大小: " },
					{ "status.crosshair_thickness", "准星粗细: " },
					{ "status.crosshair_gap", "准星间距: " },
					{ "status.crosshair_tlength", "T型长度: " },
					{ "status.color_applied", "准星颜色已应用: #" },
					{ "status.invalid_color", "颜色格式错误,请使用 #RRGGBB 格式" },
					{ "status.lang_switched", "已切换为" },
					{ "tab.about", "关于" },
					{ "about.title", "关于" },
					{ "about.desc", "插件信息与反馈" },
					{ "about.author", "作者" },
					{ "about.contact", "联系方式" },
					{ "about.email", "反馈请发送邮件至:[email protected]" },
					{ "about.version", "版本" },
					{ "about.changelog", "更新日志" },
					{ "about.changelog_text", "v1.5.1 (2026-08-30)\n  - 新增岛屿距离、动态颜色和屏幕外指示器\n  - 新增无快捷键的视觉优化(无雾效与远景距离)\n\nv1.5 (2026-08-28)\n  - 新增 FPS 显示与右下角弹匣子弹显示\n  - 弹匣计数器增加圆角显示框,FPS 移至屏幕顶部居中\n  - 优化 FPS 限制与无后坐力镜头稳定性,减少掉帧和快速滑动\n  - 新增按键绑定、配置保存与配置清除功能\n\nv1.4 (2026-08-28)\n  - 修复菜单背景变白问题\n  - 按钮宽度自适应文本长度\n  - 新增 About 标签页\n\nv1.3 (2026-08-27)\n  - 添加队友选择自瞄功能\n  - 准星跟随枪口优化\n  - 中英文切换完善\n\nv1.2 (2026-08-27)\n  - 添加弹药HUD显示\n  - 优化UI界面\n\nv1.1 (2026-08-27)\n  - 添加准星自定义\n  - 修复多个Bug\n\nv1.0 (2026-08-26)\n  - 初始版本发布" },
					{ "about.thanks", "感谢" },
					{ "about.thanks_text", "感谢所有使用和反馈的用户!" }
				}
			},
			{
				"en",
				new Dictionary<string, string>
				{
					{ "menu.title", "Boom This HowToFish - By Me0wws" },
					{ "menu.opened", "Menu opened (F1 to close)" },
					{ "menu.closed", "Menu closed" },
					{ "menu.player", "Player: " },
					{ "menu.none", "None" },
					{ "menu.money", "Money: " },
					{ "menu.categories", "Categories" },
					{ "menu.scope", "Scope" },
					{ "menu.scope_desc", "[Local] Current client only\n[Sync] Server replicates\n[Host] Host authority\n[Global] Room-wide rules" },
					{ "menu.close_hint", "F1 to close" },
					{ "menu.lang", "Language: English" },
					{ "menu.lang_switch", "Switch to Chinese" },
					{ "status.host", "Host/Server" },
					{ "status.client", "Client" },
					{ "status.none", "Not in world" },
					{ "status.godmode", "Global God Mode=" },
					{ "status.oneshot", "Global One-Shot=" },
					{ "status.move", "Move multiplier=" },
					{ "status.jump", "Jump multiplier=" },
					{ "status.move_reset", "Movement reset" },
					{ "status.lang_switched", "Switched to" },
					{ "status.host_required", "Host required with local player spawned" },
					{ "status.added_money", "Added money " },
					{ "status.removed_money", "Removed money " },
					{ "status.money_set", "Money set to " },
					{ "status.vitals_filled", "Health/food full, poison/fire cleared" },
					{ "status.teleporting", "Teleporting " },
					{ "status.to", " -> " },
					{ "status.invalid_id", "Invalid item ID: " },
					{ "status.giving", "Giving to " },
					{ "status.no_revive_target", "No revivable target" },
					{ "status.reviving", "Reviving " },
					{ "status.revive_all", "Revived all: " },
					{ "status.cleared", "Cleared: " },
					{ "status.aim_applied", "Aim settings applied" },
					{ "status.weapon_applied", "Weapon settings applied" },
					{ "status.rod_applied", "Rod settings applied" },
					{ "status.catch_set", "Catch set to " },
					{ "status.roulette_applied", "Roulette settings applied" },
					{ "status.invalid_skin", "Invalid item ID or skin index" },
					{ "status.slot_prize", "Slot prize set: " },
					{ "status.random_prize", "Slot prize randomized" },
					{ "status.command_submitted", "Command submitted: " },
					{ "status.command_invalid", "Invalid command: " },
					{ "status.items_refreshed", "Items refreshed, " },
					{ "status.skin_not_found", "Skin not found" },
					{ "status.skin_unlocked", "Skin unlocked: " },
					{ "status.all_skins_unlocked", "Skins unlocked, " },
					{ "status.clothes_unlocked", "All clothes unlocked" },
					{ "status.server_required", "Server & local player required" },
					{ "status.spawning", "Spawning " },
					{ "status.baits_unlocked", "Baits unlocked, " },
					{ "status.pockets_unlocked", "Pockets set to 5" },
					{ "status.weight_set", "Weight set to " },
					{ "status.cookness_set", "Cookness set to " },
					{ "status.no_skin", "No skin available" },
					{ "status.skin_switched", "Skin switched to " },
					{ "status.kill_mult_set", "Kill multiplier set: " },
					{ "status.bet_mult_set", "Bet multiplier set to " },
					{ "status.attachments_applied", "Attachments applied: " },
					{ "status.bullet_upgraded", "Bullet upgrades: " },
					{ "status.melee_upgraded", "Melee upgrades: " },
					{ "status.teleporting_to", "Teleporting to " },
					{ "status.boat_required", "Host & boat required" },
					{ "status.boat_unlocked", "Boat/radar/motor unlocked" },
					{ "status.max_players_set", "Max players set to " },
					{ "status.lobby_set", "Lobby set to " },
					{ "status.no_lobby", "Unable to get lobby info" },
					{ "status.error", "Error: " },
					{ "status.fps_limit", "FPS limit set to " },
					{ "status.fps_unlimited", "FPS unlimited" },
					{ "status.quitting", "Quitting to menu..." },
					{ "status.loading_main", "Loading main menu..." },
					{ "status.reloading", "Reloading: " },
					{ "status.saved_pos", "Saved " },
					{ "status.no_boat", "No boat instance" },
					{ "status.grill_unlocked", "Grill unlocked" },
					{ "status.prev_island", "Switching to previous island" },
					{ "status.next_island", "Switching to next island" },
					{ "status.boat_mult", "Boat multiplier=" },
					{ "status.slap_speed", "Slap speed=" },
					{ "status.flight_speed", "Flight speed=" },
					{ "status.esp_distance", "ESP distance=" },
					{ "status.crosshair_mode", "Crosshair mode: " },
					{ "status.crosshair_style", "Crosshair style: " },
					{ "status.crosshair_color", "Crosshair color: " },
					{ "status.crosshair_size", "Crosshair size: " },
					{ "status.crosshair_thickness", "Crosshair thickness: " },
					{ "status.crosshair_gap", "Crosshair gap: " },
					{ "status.crosshair_tlength", "T-Length: " },
					{ "status.color_applied", "Color applied: #" },
					{ "status.invalid_color", "Invalid color format, use #RRGGBB" },
					{ "tab.player", "Player / Resources" },
					{ "tab.items", "Items / Inventory" },
					{ "tab.teammates", "Teammates / World" },
					{ "tab.combat", "Combat / Fishing" },
					{ "tab.esp", "ESP / Aim / Crosshair" },
					{ "tab.casino", "Casino / Commands" },
					{ "tab.other", "Other / Settings" },
					{ "desc.player", "Money, status, god mode & movement" },
					{ "desc.items", "Spawn items, unlock inventory & edit held" },
					{ "desc.teammates", "Interact, revive, fly, teleport & world progress" },
					{ "desc.combat", "Weapons, attachments, rods, bait & catch" },
					{ "desc.esp", "Entity ESP, aim assist & crosshair" },
					{ "desc.casino", "Roulette, slots & game commands" },
					{ "desc.other", "Max players, lobby settings & more" },
					{ "card.money", "Money" },
					{ "card.money_desc", "Shared server resource, host required" },
					{ "card.vitals", "Health & Status" },
					{ "card.movement", "Movement" },
					{ "card.movement_desc", "Local calculation, position still synced" },
					{ "card.items", "Item Library & Spawn" },
					{ "card.items_desc", "Filter by name, ID, type or value; click to spawn" },
					{ "card.held", "Held Item Edit" },
					{ "card.held_desc", "Currently holding: " },
					{ "card.skins", "Skin ID & Unlock" },
					{ "card.skins_desc", "Skin IDs per item; boat uses item ID 255. Saves locally." },
					{ "card.teleport", "Coordinates & Teleport" },
					{ "card.teleport_desc", "Your character is confirmed & synced by server" },
					{ "card.world", "World Progress" },
					{ "card.world_desc", "Host authority, affects current room & save" },
					{ "card.boat", "Boat Settings" },
					{ "card.teammates", "Teammate Interaction" },
					{ "card.teammates_desc", "Select player to teleport, prank, or give items" },
					{ "card.revive", "Revive & Status" },
					{ "card.slap", "Slap Prank" },
					{ "card.slap_desc", "Pick up downed teammate; auto-slap loops animation without reviving" },
					{ "card.flight", "Flight" },
					{ "card.flight_desc", "WASD to move, Space up, Ctrl down" },
					{ "card.weapon", "Weapon Settings" },
					{ "card.weapon_desc", "Local modifications, shot RPCs synced" },
					{ "card.fishing", "Rod, Bait & Catch" },
					{ "card.equipped", "Current Equipment" },
					{ "card.equipped_desc", "Currently holding: " },
					{ "card.esp", "ESP" },
					{ "card.esp_desc", "Local drawing, doesn't modify entities" },
					{ "card.aim", "Aim Assist" },
					{ "card.aim_desc", "Prioritizes by crosshair angle; teammates use head/camera proxy" },
					{ "card.crosshair", "Crosshair Settings" },
					{ "card.crosshair_desc", "Style, color, size & more" },
					{ "card.roulette", "Roulette Settings" },
					{ "card.roulette_desc", "Results processed by host" },
					{ "card.slots", "Slots Prizes" },
					{ "card.slots_desc", "Set next prize item & skin" },
					{ "card.commands", "Game Commands" },
					{ "card.commands_desc", "Host commands; type full command to execute" },
					{ "card.commands_help", "Command Help" },
					{ "card.max_players", "Max Players" },
					{ "card.max_players_desc", "Change room max players, host only. Requires re-creating room." },
					{ "card.lobby", "Lobby Settings" },
					{ "card.lobby_desc", "Quick toggle room public/private" },
					{ "card.performance", "Performance" },
					{ "card.performance_desc", "Adjust game performance options" },
					{ "card.quick", "Quick Actions" },
					{ "card.quick_desc", "Common game operations" },
					{ "btn.add", "[Host] Add" },
					{ "btn.remove", "[Host] Remove" },
					{ "btn.set", "[Host] Set" },
					{ "btn.fill_vitals", "[Host] Full health/food, clear poison/fire" },
					{ "btn.godmode_global", "[Host/Global] God Mode: " },
					{ "btn.oneshot", "[Host/Global] One-Shot: " },
					{ "btn.apply", "Apply" },
					{ "btn.reset", "Reset" },
					{ "btn.reset_players", "Reset to 8" },
					{ "btn.refresh_items", "Refresh All Items" },
					{ "btn.clear_filter", "Clear Filter" },
					{ "btn.unlock_baits", "[Sync/Self] Unlock all baits" },
					{ "btn.unlock_pockets", "[Host/Self] Unlock all pockets" },
					{ "btn.spawn", "[Sync] Spawn to hand" },
					{ "btn.prev", "Prev" },
					{ "btn.next", "Next" },
					{ "btn.set_weight", "[Host] Set Weight" },
					{ "btn.raw", "Raw" },
					{ "btn.perfect", "Perfect" },
					{ "btn.burnt", "Burnt" },
					{ "btn.next_skin", "[Sync] Next Skin" },
					{ "btn.kill_mult", "[Sync] Kill Multiplier" },
					{ "btn.bet_mult", "[Host] Bet Multiplier" },
					{ "btn.unlock_all_skins", "[Local Save] Unlock all skins" },
					{ "btn.unlock_clothes", "[Local/Session] Unlock all clothes" },
					{ "btn.unlock_skin", "Unlock Skin" },
					{ "btn.unlock", "[Local Save] Unlock" },
					{ "btn.teleport", "[Sync] Teleport" },
					{ "btn.save_pos", "Save Position" },
					{ "btn.return_pos", "[Sync] Return" },
					{ "btn.forward", "[Sync] Forward 10m" },
					{ "btn.to_boat", "[Sync] To Boat" },
					{ "btn.unlock_boat", "[Host] Unlock Boat/Radar/Max Motor" },
					{ "btn.unlock_grill", "[Host] Unlock Grill" },
					{ "btn.prev_island", "[Host/Global] Prev Island" },
					{ "btn.next_island", "[Host/Global] Next Island" },
					{ "btn.apply_mult", "Apply Multiplier" },
					{ "btn.pull_here", "[Sync] Pull to me" },
					{ "btn.go_to_teammate", "[Sync] Go to teammate" },
					{ "btn.throw_forward", "[Sync] Throw forward 10m" },
					{ "btn.give_item", "[Sync] Give item to teammate" },
					{ "btn.revive", "[Sync] Revive selected" },
					{ "btn.revive_all", "[Sync] Revive all" },
					{ "btn.clear_self", "[Host] Clear self" },
					{ "btn.clear_teammate", "[Host] Clear teammate" },
					{ "btn.apply_rod", "Apply Rod Settings" },
					{ "btn.apply_catch", "Apply Catch Settings" },
					{ "btn.max_attachments", "[Host/Sync] Max Attachments" },
					{ "btn.max_bullets", "[Host/Sync] Max Bullets" },
					{ "btn.max_melee", "[Host/Sync] Max Melee" },
					{ "btn.apply_aim", "Apply Aim Settings" },
					{ "btn.apply_roulette", "Apply Roulette Settings" },
					{ "btn.set_prize", "[Host] Set Prize" },
					{ "btn.random_prize", "[Host] Random Prize" },
					{ "btn.execute", "[Host] Execute" },
					{ "btn.public", "Set Public" },
					{ "btn.private", "Set Private" },
					{ "btn.unlimited", "Unlimited" },
					{ "btn.quit", "Quit to Menu" },
					{ "btn.reload", "Reload Scene" },
					{ "btn.select_all", "Select All" },
					{ "btn.deselect_all", "Deselect All" },
					{ "btn.invert_select", "Invert" },
					{ "toggle.godmode", "[Host/Self] Personal God Mode" },
					{ "toggle.keep_full", "[Host/Self] Keep Full" },
					{ "toggle.infinite_ammo", "[Local] Infinite Ammo" },
					{ "toggle.no_spread", "[Local] No Spread/Recoil" },
					{ "toggle.rapid_fire", "[Local] Rapid Fire ×0.12" },
					{ "toggle.skip_bolt", "[Local] Skip Bolt/Anim" },
					{ "toggle.force_auto", "[Local] Force Full Auto" },
					{ "toggle.custom_weapon", "[Local/Sync] Custom Weapon" },
					{ "toggle.fast_fishing", "[Local/Sync] Fast Fishing ×6" },
					{ "toggle.instant_bite", "[Host] Instant Bite" },
					{ "toggle.custom_rod", "[Local/Sync] Custom Rod" },
					{ "toggle.force_catch", "[Host] Force Catch" },
					{ "toggle.shiny", "Force Shiny" },
					{ "toggle.esp", "[Local] ESP" },
					{ "toggle.players", "Players" },
					{ "toggle.alive", "Alive" },
					{ "toggle.dead", "Dead" },
					{ "toggle.items", "Items" },
					{ "toggle.boxes", "Boxes" },
					{ "toggle.corners", "Corner Boxes" },
					{ "toggle.healthbars", "Health Bars" },
					{ "toggle.snaplines", "Snaplines" },
					{ "toggle.strong_aim", "[Local] Strong Aim" },
					{ "toggle.no_ads", "[Local] No ADS Required" },
					{ "toggle.sticky", "[Local] Sticky Target" },
					{ "toggle.predict", "[Local] Prediction" },
					{ "toggle.magic", "[Local/Sync] Magic Bullet" },
					{ "toggle.ignore", "Ignore Obstacles" },
					{ "toggle.outline", "Show Outline" },
					{ "toggle.spread_ring", "Show Spread Ring" },
					{ "toggle.roulette_win", "[Host] Always Win" },
					{ "toggle.roulette_payout", "[Host] Custom Payout" },
					{ "toggle.auto_slap", "[Sync] Auto Slap" },
					{ "toggle.fast_slap", "[Local/Sync] Fast Slap" },
					{ "toggle.flight", "[Local] Flight" },
					{ "toggle.boat_boost", "[Host/Global] Boat Boost" },
					{ "label.move_mult", "Move Multiplier" },
					{ "label.jump_mult", "Jump Multiplier" },
					{ "label.items_count", "Items: {0} match, {1} pages. Click to spawn free." },
					{ "label.page", "Page {0} / {1}" },
					{ "label.item_id", "Item ID" },
					{ "label.skin_id", "Skin ID" },
					{ "label.skins_count", "Skins: {0} match. Format: Item ID / Skin ID / Name / Rarity" },
					{ "label.coords", "Coords: X {0}  Y {1}  Z {2}" },
					{ "label.selected", "Selected: " },
					{ "label.downed", " [Downed]" },
					{ "label.holding", "● Holding selected" },
					{ "label.waiting", "○ Waiting for selected" },
					{ "label.speed", "Speed" },
					{ "label.speed_mult", "Speed Multiplier" },
					{ "label.sniper_tip", "Sniper tip: Skip Bolt + Full Auto + Rapid Fire ×0.12" },
					{ "label.delay", "Delay×" },
					{ "label.speed_param", "Speed×" },
					{ "label.count", "Count" },
					{ "label.spread", "Spread×" },
					{ "label.recoil", "Recoil×" },
					{ "label.damage", "Damage×" },
					{ "label.reel", "Reel×" },
					{ "label.step", "Step×" },
					{ "label.throw", "Throw×" },
					{ "label.weight", "Weight/Size" },
					{ "label.ammo", "Ammo: " },
					{ "label.damage_colon", " | Damage: " },
					{ "label.rod_detected", "Fishing rod detected." },
					{ "label.distance", "Distance" },
					{ "label.box_style", "Box Style: " },
					{ "label.esp_color_tip", "Colors: Cyan=Player, Green=Alive, Red=Dead, Yellow=Item; shows name, distance & HP/weight." },
					{ "label.target_type", "Target Type: " },
					{ "label.aim_params", "Distance / Acquire / Speed" },
					{ "label.sharpness", "Sharpness / Prediction" },
					{ "label.magic_tip", "Magic Bullet uses target type above; no need to aim." },
					{ "label.mode", "Mode" },
					{ "label.current", "Current: " },
					{ "label.style", "Style" },
					{ "label.current_style", "Current Style: " },
					{ "label.color", "Color" },
					{ "label.custom", "Custom(#)" },
					{ "label.size", "Size" },
					{ "label.thickness", "Thickness" },
					{ "label.gap", "Gap" },
					{ "label.t_length", "T Length" },
					{ "label.current_color", "Current Color: " },
					{ "label.red_black", "Red/Black" },
					{ "label.green", "Green" },
					{ "label.commands_help_title", "All Commands & Description:" },
					{ "label.commands_list", "spawn / spawndead / spawndrip / grill / boat / addmoney / removemoney / nextisland / previsland / godmode / oneshot / killboss / allskins / noskins / finishgame / unlockachievements / lockachievements" },
					{ "label.command_example", "Example: /spawn fishingrod   /spawndead piranha   /addmoney   /godmode" },
					{ "label.commands_help_detail", "┌─────────────────────────────────────────────────────────┐\n│ Command                        │ Description              │\n├─────────────────────────────────────────────────────────┤\n│ spawn <item>                   │ Spawn item               │\n│ spawndead <creature>           │ Spawn dead creature      │\n│ spawndrip <creature>           │ Spawn shiny creature     │\n│ grill                          │ Unlock grill             │\n│ boat                           │ Unlock boat/radar/motor  │\n│ addmoney <amount>              │ Add money                │\n│ removemoney <amount>           │ Remove money             │\n│ nextisland                     │ Next island              │\n│ previsland                     │ Previous island          │\n│ godmode                        │ Toggle God Mode          │\n│ oneshot                        │ Toggle One-Shot          │\n│ killboss                       │ Kill boss                │\n│ allskins                       │ Unlock all skins         │\n│ noskins                        │ Remove all skins         │\n│ finishgame                     │ Finish game              │\n│ unlockachievements             │ Unlock all achievements  │\n│ lockachievements               │ Lock all achievements    │\n└─────────────────────────────────────────────────────────┘" },
					{ "label.max_players", "Max Players" },
					{ "label.current_fmt", "(Current: {0})" },
					{ "label.max_players_tip", "Note: Requires re-creating room (quit to menu and re-enter) to take effect." },
					{ "label.lobby_status", "Status: " },
					{ "label.public", "Public" },
					{ "label.private", "Private" },
					{ "label.fps_limit", "FPS Limit" },
					{ "label.current_fps", "Current FPS: {0}" },
					{ "label.team_select", "Team Select Aim" },
					{ "label.team_mode_desc", "Current Mode: " },
					{ "label.team_count", "{0} teammates, {1} selected" },
					{ "style.dot", "Dot" },
					{ "style.cross", "Cross" },
					{ "style.t", "T-Shape" },
					{ "style.circle", "Circle" },
					{ "style.dot_circle", "Dot+Circle" },
					{ "style.crosshair", "Crosshair" },
					{ "color.white", "White" },
					{ "color.red", "Red" },
					{ "color.green", "Green" },
					{ "color.blue", "Blue" },
					{ "color.cyan", "Cyan" },
					{ "color.yellow", "Yellow" },
					{ "label.type", "Type" },
					{ "label.price", "Price" },
					{ "label.value", "Value" },
					{ "label.item", "Item" },
					{ "label.skin", "Skin" },
					{ "label.name", "Name" },
					{ "label.rarity", "Rarity" },
					{ "mode.all", "All Teammates" },
					{ "mode.selected", "Selected Only" },
					{ "mode.excluded", "Exclude Selected" },
					{ "mode.off", "Off" },
					{ "mode.fixed", "Fixed Center" },
					{ "mode.follow", "Follow Muzzle" },
					{ "label.default", "Default" },
					{ "label.common", "Common" },
					{ "label.rare", "Rare" },
					{ "label.epic", "Epic" },
					{ "label.legendary", "Legendary" },
					{ "tab.about", "About" },
					{ "about.title", "About" },
					{ "about.desc", "Plugin info & feedback" },
					{ "about.author", "Author" },
					{ "about.contact", "Contact" },
					{ "about.email", "Feedback to: [email protected]" },
					{ "about.version", "Version" },
					{ "about.changelog", "Changelog" },
					{ "about.changelog_text", "v1.5.1 (2026-08-30)\n  - Added island distance, dynamic colors and off-screen indicators\n  - Added vision optimization without the original hotkeys\n\nv1.5 (2026-08-28)\n  - Added FPS display and bottom-right ammo counter\n  - Added a rounded ammo counter box and centered the FPS display\n  - Improved FPS limiting and no-recoil camera stability\n  - Added key bindings, configuration saving and clearing\n\nv1.4 (2026-08-28)\n  - Fixed menu background turning white\n  - Button width auto-adapts to text length\n  - Added About tab\n\nv1.3 (2026-08-27)\n  - Added team select aim feature\n  - Crosshair follow muzzle optimization\n  - Improved language switching\n\nv1.2 (2026-08-27)\n  - Added Ammo HUD display\n  - UI improvements\n\nv1.1 (2026-08-27)\n  - Added crosshair customization\n  - Fixed multiple bugs\n\nv1.0 (2026-08-26)\n  - Initial release" },
					{ "about.thanks", "Thanks" },
					{ "about.thanks_text", "Thanks to all users for your support and feedback!" }
				}
			}
		};

		public const string PluginGuid = "cn.yux.howtofish.trainer";

		public const string PluginName = "Boom This HowToFish - By Me0wws";

		public const string PluginVersion = "1.5.1";

		private Texture2D _whiteTexture;

		private Vector2 _changelogScroll;

		private readonly Dictionary<string, bool> _selectedTeammates = new Dictionary<string, bool>();

		private string _aimTeammateMode = "全部";

		private Vector2 _teammateScroll;

		private Harmony _harmony;

		private Rect _window = new Rect(30f, 30f, 1180f, 800f);

		private Vector2 _mainScroll;

		private int _itemPage;

		private bool _menuVisible;

		private int _tab;

		private bool _selfGod;

		private bool _keepVitalsFull;

		private bool _infiniteAmmo;

		private bool _noSpread;

		private bool _rapidFire;

		private bool _skipBoltAction;

		private bool _forceFullAuto;

		private bool _fastFishing;

		private bool _strongAim;

		private bool _instantBite;

		private bool _boatBoost;

		private bool _flight;

		private bool _flightWasActive;

		private bool _aimWithoutAds;

		private bool _aimTeammates;

		private bool _aimAliveCreatures = true;

		private bool _aimDeadCreatures;

		private bool _aimItems;

		private bool _aimIgnoreObstacles;

		private bool _aimStickyTarget = true;

		private bool _aimPredictMovement = true;

		private bool _magicBullet;

		private bool _customWeapon;

		private bool _customRod;

		private bool _espEnabled;

		private bool _espPlayers = true;

		private bool _espAliveCreatures = true;

		private bool _espDeadCreatures;

		private bool _espItems;

		private bool _espBoxes = true;

		private bool _espCornerBoxes;

		private bool _espHealthBars = true;

		private bool _espSnaplines;

		private bool _rouletteAlwaysWin;

		private bool _customRoulettePayout;

		private bool _forceCatchItem;

		private bool _forceCatchShiny;

		private bool _autoSlap;

		private bool _fastSlap;

		private bool _showFps;

		private bool _showAmmoCounter = true;

		private bool _islandEspEnabled;

		private bool _islandVisionOptimization;

		private bool _islandVisionApplied;

		private float _islandOriginalFarClip;

		private bool _islandOriginalFog;

		private bool _islandOriginalFogCaptured;

		private float _fpsSampleTotal;

		private int _fpsSampleCount;

		private float _fpsSampleLowest = float.MaxValue;

		private float _averageFps;

		private float _lowestFps;

		private bool _lastNoRecoilState;

		private List<KeyBinding> _keyBindings = new List<KeyBinding>();

		private int _listeningBinding = -1;

		private int _maxPlayers = 8;

		private string _maxPlayersText = "8";

		private string _fpsLimitText = "60";

		private string _crosshairModeText = "跟随枪口";

		private string _crosshairColorText = "#FFFFFF";

		private string _crosshairSizeText = "10";

		private string _crosshairThicknessText = "2";

		private string _crosshairGapText = "4";

		private string _crosshairTLengthText = "15";

		private float _moveMultiplier = 1f;

		private float _jumpMultiplier = 1f;

		private float _boatMultiplier = 1f;

		private float _flightSpeed = 15f;

		private float _aimDistance = 200f;

		private float _aimAcquireAngle = 60f;

		private float _aimRotationSpeed = 1440f;

		private float _aimTrackingSharpness = 80f;

		private float _aimPredictionFactor = 1f;

		private float _weaponDelayMultiplier = 1f;

		private float _weaponProjectileSpeedMultiplier = 1f;

		private float _weaponSpreadMultiplier = 1f;

		private float _weaponRecoilMultiplier = 1f;

		private float _weaponDamageMultiplier = 1f;

		private int _weaponProjectileCount = 1;

		private float _rodReelMultiplier = 1f;

		private float _rodStepMultiplier = 1f;

		private float _rodThrowMultiplier = 1f;

		private float _espDistance = 250f;

		private float _rouletteRedBlackMultiplier = 2f;

		private float _rouletteGreenMultiplier = 35f;

		private float _catchWeight = 1f;

		private string _moneyText = "99999";

		private string _moveText = "1";

		private string _jumpText = "1";

		private string _boatText = "1";

		private string _flightSpeedText = "15";

		private string _aimDistanceText = "200";

		private string _aimAngleText = "60";

		private string _aimSpeedText = "1440";

		private string _aimSharpnessText = "80";

		private string _aimPredictionText = "1";

		private string _weaponDelayText = "1";

		private string _weaponProjectileSpeedText = "1";

		private string _weaponProjectileCountText = "1";

		private string _weaponSpreadText = "1";

		private string _weaponRecoilText = "1";

		private string _weaponDamageText = "1";

		private string _rodReelText = "1";

		private string _rodStepText = "1";

		private string _rodThrowText = "1";

		private string _espDistanceText = "250";

		private string _rouletteRedBlackText = "2";

		private string _rouletteGreenText = "35";

		private string _slotItemIdText = "0";

		private string _slotSkinText = "0";

		private string _catchItemIdText = "0";

		private string _catchWeightText = "1";

		private string _teammateItemIdText = "0";

		private string _itemWeightText = "1";

		private string _itemMultiplierText = "5";

		private string _betMultiplierText = "5";

		private string _teleportX = "0";

		private string _teleportY = "0";

		private string _teleportZ = "0";

		private string _itemFilter = "";

		private string _skinFilter = "";

		private string _skinItemIdText = "0";

		private string _skinIndexText = "0";

		private string _slapSpeedText = "4";

		private string _command = "/addmoney";

		private string _status = "按 F1 打开修改器";

		private Vector3 _savedPosition;

		private bool _hasSavedPosition;

		private CursorLockMode _previousCursorLock;

		private bool _previousCursorVisible;

		private bool _isMenuMouseUnlocked;

		private PlayerMovement _cachedMovement;

		private MovementDefaults _movementDefaults;

		private PlayerAimAssist _cachedAim;

		private AimDefaults _aimDefaults;

		private readonly Dictionary<EntityId, WeaponDefaults> _weaponDefaults = new Dictionary<EntityId, WeaponDefaults>();

		private readonly Dictionary<EntityId, RodDefaults> _rodDefaults = new Dictionary<EntityId, RodDefaults>();

		private readonly Dictionary<EntityId, BoatMotorDefaults> _boatMotorDefaults = new Dictionary<EntityId, BoatMotorDefaults>();

		private readonly Dictionary<EntityId, BaitDefaults> _baitDefaults = new Dictionary<EntityId, BaitDefaults>();

		private List<Item> _items = new List<Item>();

		private float _nextItemRefresh;

		private float _nextErrorLog;

		private float _nextMenuHotkeyTime;

		private Player _selectedTeammate;

		private int _skinPage;

		private float _slapSpeed = 4f;

		private DeadPlayer _speedModifiedCorpse;

		private float _defaultResurrectSpeed;

		private DeadPlayer _activeSlapCorpse;

		private int _lastSlapCycle = -1;

		private float _nextSlapRpcTime;

		private float _slapCycleStartTime;

		private Transform _lockedAimTarget;

		private readonly List<AimCandidate> _aimCandidates = new List<AimCandidate>();

		private GUIStyle _espStyle;

		private Texture2D _espTexture;

		private GUISkin _uiSkin;

		private GUIStyle _windowStyle;

		private GUIStyle _headerStyle;

		private GUIStyle _sidebarStyle;

		private GUIStyle _contentStyle;

		private GUIStyle _footerStyle;

		private GUIStyle _navStyle;

		private GUIStyle _navActiveStyle;

		private GUIStyle _titleStyle;

		private GUIStyle _pageTitleStyle;

		private GUIStyle _sectionTitleStyle;

		private GUIStyle _mutedStyle;

		private GUIStyle _statusStyle;

		private GUIStyle _footerCenterStyle;

		private GUIStyle _badgeStyle;

		private GUIStyle _cardStyle;

		private GUIStyle _checkboxStyle;

		private GUIStyle _hudStyle;

		private GUIStyle _ammoHudStyle;

		private GUIStyle _hudBoxStyle;

		private Texture2D _islandLineTexture;

		private readonly List<Texture2D> _uiTextures = new List<Texture2D>();

		private bool _isResizing;

		private Vector2 _resizeStartMouse;

		private Rect _resizeStartRect;

		private static readonly FieldInfo WalkSpeedField = AccessTools.Field(typeof(PlayerMovement), "_walkSpeed");

		private static readonly FieldInfo SprintSpeedField = AccessTools.Field(typeof(PlayerMovement), "_sprintSpeed");

		private static readonly FieldInfo JumpForceField = AccessTools.Field(typeof(PlayerMovement), "_jumpForce");

		private static readonly FieldInfo WeaponShotDelayField = AccessTools.Field(typeof(Weapon), "_timeBetweenShots");

		private static readonly FieldInfo WeaponSpreadField = AccessTools.Field(typeof(Weapon), "_spread");

		private static readonly FieldInfo WeaponRecoilField = AccessTools.Field(typeof(Weapon), "_recoilKnockback");

		private static readonly FieldInfo WeaponProjectileSpeedField = AccessTools.Field(typeof(Weapon), "_projSpeed");

		private static readonly FieldInfo WeaponProjectileCountField = AccessTools.Field(typeof(Weapon), "_projectileCountPerShot");

		private static readonly FieldInfo WeaponInfoField = AccessTools.Field(typeof(Weapon), "_weaponInfo");

		private static readonly FieldInfo WeaponFullAutoField = AccessTools.Field(typeof(Weapon), "_fullAuto");

		private static readonly FieldInfo WeaponNoShootDuringAnimationField = AccessTools.Field(typeof(Weapon), "_noShootingDuringShootAnim");

		private static readonly FieldInfo WeaponNoQueueingShotsField = AccessTools.Field(typeof(Weapon), "_noQueueingShots");

		private static readonly PropertyInfo WeaponAmmoProperty = AccessTools.Property(typeof(Weapon), "Ammo");

		private static readonly FieldInfo RodReelSpeedField = AccessTools.Field(typeof(FishingRod), "_holdReelSpeed");

		private static readonly FieldInfo RodReelStepField = AccessTools.Field(typeof(FishingRod), "_lineReelStepLength");

		private static readonly FieldInfo RodThrowSpeedField = AccessTools.Field(typeof(FishingRod), "_lineThrowSpeed");

		private static readonly FieldInfo BoatMotorsField = AccessTools.Field(typeof(Boat), "_motors");

		private static readonly PropertyInfo BoatMotorForceProperty = AccessTools.Property(typeof(BoatMotor), "Force");

		private static readonly FieldInfo AimDistanceField = AccessTools.Field(typeof(PlayerAimAssist), "_maxTargetDistance");

		private static readonly FieldInfo AimAcquireAngleField = AccessTools.Field(typeof(PlayerAimAssist), "_adsAcquireAngle");

		private static readonly FieldInfo AimBreakAngleField = AccessTools.Field(typeof(PlayerAimAssist), "_trackingBreakAngle");

		private static readonly FieldInfo AimRotationSpeedField = AccessTools.Field(typeof(PlayerAimAssist), "_maxRotationSpeed");

		private static readonly FieldInfo AimSharpnessField = AccessTools.Field(typeof(PlayerAimAssist), "_trackingSharpness");

		private static readonly MethodInfo AimCacheSettingsMethod = AccessTools.Method(typeof(PlayerAimAssist), "CacheSettings", (Type[])null, (Type[])null);

		private static readonly FieldInfo DeadPlayerResurrectSpeedField = AccessTools.Field(typeof(DeadPlayer), "_resurrectSpeed");

		private static readonly FieldInfo DeadPlayerResurrectPercentField = AccessTools.Field(typeof(DeadPlayer), "_resurrectPercent");

		private static readonly FieldInfo DeadPlayerIsResurrectingField = AccessTools.Field(typeof(DeadPlayer), "_isResurrecting");

		private static readonly MethodInfo DeadPlayerStartSlapMethod = AccessTools.Method(typeof(DeadPlayer), "StartSlapAnimation", (Type[])null, (Type[])null);

		private static readonly MethodInfo DeadPlayerUpdateSlapMethod = AccessTools.Method(typeof(DeadPlayer), "UpdateSlapHandAnimation", (Type[])null, (Type[])null);

		private static readonly MethodInfo DeadPlayerStartSlapReturnMethod = AccessTools.Method(typeof(DeadPlayer), "StartSlapHandReturn", (Type[])null, (Type[])null);

		private static readonly FieldInfo BaitCatchTimeField = AccessTools.Field(typeof(BaitInfo), "_catchTimeMinMax");

		private static readonly FieldInfo BaitLostChanceField = AccessTools.Field(typeof(BaitInfo), "_lostOnBaitChance");

		private static readonly FieldInfo BaitRequireReelingField = AccessTools.Field(typeof(BaitInfo), "_requireReelingToCatch");

		private static readonly FieldInfo CasinoBetColorField = AccessTools.Field(typeof(CasinoManager), "_curBetColor");

		private static readonly FieldInfo CameraRecoilTargetField = AccessTools.Field(typeof(PlayerCamera), "_recoilTar");

		private static readonly FieldInfo CameraRecoilCurrentField = AccessTools.Field(typeof(PlayerCamera), "_recoilCur");

		private static readonly FieldInfo ToolLookRotationField = AccessTools.Field(typeof(PlayerToolMovement), "_lookRot");

		internal bool SelfGodEnabled => _selfGod;

		internal bool StrongAimEnabled => _strongAim;

		internal bool NoRecoilEnabled => _noSpread;

		internal bool AimWithoutAdsEnabled => _strongAim && _aimWithoutAds;

		internal bool ForceCatchItemEnabled => _forceCatchItem;

		internal bool ForceCatchShinyEnabled => _forceCatchShiny;

		internal float ForcedCatchWeight => _catchWeight;

		internal bool RouletteAlwaysWinEnabled => _rouletteAlwaysWin;

		internal bool CustomRoulettePayoutEnabled => _customRoulettePayout;

		private bool IsHost => Object.op_Implicit((Object)(object)Server.Instance) && ((NetworkBehaviour)Server.Instance).IsServerInitialized;

		private bool HasServerConnection => Object.op_Implicit((Object)(object)Server.Instance) && ((NetworkBehaviour)Server.Instance).IsClientInitialized;

		private ConfigFile _config => ((BaseUnityPlugin)this).Config;

		[DllImport("user32.dll")]
		private static extern short GetAsyncKeyState(int virtualKey);

		private void Awake()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			Instance = this;
			_maxPlayers = 8;
			_maxPlayersText = _maxPlayers.ToString();
			_fpsLimitText = "60";
			LoadConfig();
			InitializeKeyBindings();
			InitializeCrosshair();
			_harmony = new Harmony("cn.yux.howtofish.trainer");
			_harmony.PatchAll(typeof(TrainerPlugin).Assembly);
			ClientSettings.ToggleCheats(true);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Boom This HowToFish - By Me0wws v1.5.1 已加载; F1 切换菜单。");
		}

		private void OnDestroy()
		{
			RestoreFlight();
			RestoreMovement();
			RestoreAllWeapons();
			RestoreAllRods();
			RestoreAim();
			RestoreBoatMotors();
			RestoreBaits();
			RestoreSlapSpeed();
			if (Object.op_Implicit((Object)(object)_espTexture))
			{
				Object.Destroy((Object)(object)_espTexture);
			}
			if (Object.op_Implicit((Object)(object)_uiSkin))
			{
				Object.Destroy((Object)(object)_uiSkin);
			}
			foreach (Texture2D uiTexture in _uiTextures)
			{
				if (Object.op_Implicit((Object)(object)uiTexture))
				{
					Object.Destroy((Object)(object)uiTexture);
				}
			}
			_uiTextures.Clear();
			if (Object.op_Implicit((Object)(object)_islandLineTexture))
			{
				Object.Destroy((Object)(object)_islandLineTexture);
			}
			RestoreIslandVisionOptimization();
			Harmony harmony = _harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			Instance = null;
		}

		private void Update()
		{
			if (MenuHotkeyPressed() && Time.unscaledTime >= _nextMenuHotkeyTime)
			{
				_nextMenuHotkeyTime = Time.unscaledTime + 0.35f;
				ToggleMenu();
			}
			ProcessKeyBindings();
			ApplyIslandVisionOptimization();
			if (_noSpread && !_lastNoRecoilState)
			{
				ClearPendingRecoil();
			}
			_lastNoRecoilState = _noSpread;
			try
			{
				ClientSettings.ToggleCheats(true);
				ApplyContinuousOptions();
			}
			catch (Exception ex)
			{
				if (Time.unscaledTime >= _nextErrorLog)
				{
					_nextErrorLog = Time.unscaledTime + 5f;
					((BaseUnityPlugin)this).Logger.LogWarning((object)ex);
				}
			}
		}

		private static bool MenuHotkeyPressed()
		{
			try
			{
				short asyncKeyState = GetAsyncKeyState(112);
				short asyncKeyState2 = GetAsyncKeyState(45);
				return Application.isFocused && ((asyncKeyState & 1) != 0 || (asyncKeyState2 & 1) != 0);
			}
			catch
			{
				return false;
			}
		}

		private void ToggleMenu()
		{
			//IL_005c: 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)
			_menuVisible = !_menuVisible;
			if (_menuVisible)
			{
				_previousCursorLock = Cursor.lockState;
				_previousCursorVisible = Cursor.visible;
				Cursor.lockState = (CursorLockMode)0;
				Cursor.visible = true;
				PlayerCamera.ToggleMouse(true);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"菜单已打开,鼠标已解锁");
			}
			else
			{
				Cursor.lockState = _previousCursorLock;
				Cursor.visible = _previousCursorVisible;
				PlayerCamera.ToggleMouse(false);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"菜单已关闭,鼠标已恢复");
			}
			SetStatus(_menuVisible ? T("menu.opened") : T("menu.closed"));
		}

		private void ClearPendingRecoil()
		{
			//IL_0038: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				Player localPlayer = Player.LocalPlayer;
				if (Object.op_Implicit((Object)(object)localPlayer))
				{
					PlayerCamera camera = localPlayer.Camera;
					if (Object.op_Implicit((Object)(object)camera))
					{
						CameraRecoilTargetField?.SetValue(camera, Vector2.zero);
						CameraRecoilCurrentField?.SetValue(camera, Vector2.zero);
					}
					if (Object.op_Implicit((Object)(object)localPlayer.ToolMovement))
					{
						ToolLookRotationField?.SetValue(localPlayer.ToolMovement, Vector3.zero);
					}
				}
			}
			catch
			{
			}
		}

		internal void ClearCameraRecoil(PlayerCamera camera)
		{
			//IL_0023: 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)
			if (Object.op_Implicit((Object)(object)camera) && _noSpread)
			{
				CameraRecoilTargetField?.SetValue(camera, Vector2.zero);
				CameraRecoilCurrentField?.SetValue(camera, Vector2.zero);
			}
		}

		private void ApplyContinuousOptions()
		{
			Player localPlayer = Player.LocalPlayer;
			if (!Object.op_Implicit((Object)(object)localPlayer))
			{
				RestoreFlight();
				RestoreMovement();
				RestoreSlapSpeed();
				return;
			}
			ApplyMovement(localPlayer.Movement);
			ApplyAim(localPlayer.AimAssist);
			ApplyBoatBoost();
			ApplyBaitOptions();
			if (_keepVitalsFull && IsHost && Object.op_Implicit((Object)(object)localPlayer.Vitals))
			{
				localPlayer.Vitals.Heal(1000);
				localPlayer.Vitals.RestoreFullness(1000);
				localPlayer.Vitals._syncedPoison.Value = 0;
				localPlayer.Vitals._syncedFire.Value = 0;
			}
			Item val = (Object.op_Implicit((Object)(object)localPlayer.Holding) ? localPlayer.Holding.HeldItem : null);
			ApplyWeapon(Object.op_Implicit((Object)(object)val) ? val.Weapon : null);
			ApplyRod(Object.op_Implicit((Object)(object)val) ? val.FishingRod : null);
			ApplySlapSpeed((DeadPlayer)(object)((val is DeadPlayer) ? val : null));
		}

		private void ApplyMovement(PlayerMovement movement)
		{
			if (!Object.op_Implicit((Object)(object)movement))
			{
				RestoreMovement();
				return;
			}
			if ((Object)(object)_cachedMovement != (Object)(object)movement)
			{
				RestoreMovement();
				_cachedMovement = movement;
				_movementDefaults = new MovementDefaults
				{
					Walk = GetFloat(WalkSpeedField, movement, 1f),
					Sprint = GetFloat(SprintSpeedField, movement, 1f),
					Jump = GetFloat(JumpForceField, movement, 1f)
				};
			}
			SetFloat(WalkSpeedField, movement, _movementDefaults.Walk * _moveMultiplier);
			SetFloat(SprintSpeedField, movement, _movementDefaults.Sprint * _moveMultiplier);
			SetFloat(JumpForceField, movement, _movementDefaults.Jump * _jumpMultiplier);
		}

		private void RestoreMovement()
		{
			if (Object.op_Implicit((Object)(object)_cachedMovement))
			{
				SetFloat(WalkSpeedField, _cachedMovement, _movementDefaults.Walk);
				SetFloat(SprintSpeedField, _cachedMovement, _movementDefaults.Sprint);
				SetFloat(JumpForceField, _cachedMovement, _movementDefaults.Jump);
			}
			_cachedMovement = null;
		}

		private void ApplyAim(PlayerAimAssist aim)
		{
			if (!Object.op_Implicit((Object)(object)aim))
			{
				RestoreAim();
				return;
			}
			if ((Object)(object)_cachedAim != (Object)(object)aim)
			{
				RestoreAim();
				_cachedAim = aim;
				_aimDefaults = new AimDefaults
				{
					Distance = GetFloat(AimDistanceField, aim, 60f),
					AcquireAngle = GetFloat(AimAcquireAngleField, aim, 18f),
					BreakAngle = GetFloat(AimBreakAngleField, aim, 40f),
					RotationSpeed = GetFloat(AimRotationSpeedField, aim, 120f),
					Sharpness = GetFloat(AimSharpnessField, aim, 10f)
				};
			}
			SetFloat(AimDistanceField, aim, _strongAim ? _aimDistance : _aimDefaults.Distance);
			SetFloat(AimAcquireAngleField, aim, _strongAim ? _aimAcquireAngle : _aimDefaults.AcquireAngle);
			SetFloat(AimBreakAngleField, aim, _strongAim ? 100f : _aimDefaults.BreakAngle);
			SetFloat(AimRotationSpeedField, aim, _strongAim ? _aimRotationSpeed : _aimDefaults.RotationSpeed);
			SetFloat(AimSharpnessField, aim, _strongAim ? _aimTrackingSharpness : _aimDefaults.Sharpness);
			if (AimCacheSettingsMethod != null)
			{
				AimCacheSettingsMethod.Invoke(aim, null);
			}
		}

		private void RestoreAim()
		{
			if (Object.op_Implicit((Object)(object)_cachedAim))
			{
				SetFloat(AimDistanceField, _cachedAim, _aimDefaults.Distance);
				SetFloat(AimAcquireAngleField, _cachedAim, _aimDefaults.AcquireAngle);
				SetFloat(AimBreakAngleField, _cachedAim, _aimDefaults.BreakAngle);
				SetFloat(AimRotationSpeedField, _cachedAim, _aimDefaults.RotationSpeed);
				SetFloat(AimSharpnessField, _cachedAim, _aimDefaults.Sharpness);
				if (AimCacheSettingsMethod != null)
				{
					AimCacheSettingsMethod.Invoke(_cachedAim, null);
				}
			}
			_cachedAim = null;
		}

		private void ApplyBoatBoost()
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			Boat boat = BoatManager.Boat;
			if (!Object.op_Implicit((Object)(object)boat) || !IsHost)
			{
				RestoreBoatMotors();
			}
			else
			{
				if (!(BoatMotorsField?.GetValue(boat) is IEnumerable enumerable))
				{
					return;
				}
				foreach (object item in enumerable)
				{
					BoatMotor val = (BoatMotor)((item is BoatMotor) ? item : null);
					if (Object.op_Implicit((Object)(object)val))
					{
						EntityId entityId = ((Object)val).GetEntityId();
						if (!_boatMotorDefaults.ContainsKey(entityId))
						{
							_boatMotorDefaults[entityId] = new BoatMotorDefaults
							{
								Motor = val,
								Force = val.Force
							};
						}
						BoatMotorDefaults boatMotorDefaults = _boatMotorDefaults[entityId];
						if (BoatMotorForceProperty != null)
						{
							BoatMotorForceProperty.SetValue(val, boatMotorDefaults.Force * (_boatBoost ? _boatMultiplier : 1f), null);
						}
					}
				}
			}
		}

		private void RestoreBoatMotors()
		{
			foreach (BoatMotorDefaults value in _boatMotorDefaults.Values)
			{
				if (Object.op_Implicit((Object)(object)value.Motor) && BoatMotorForceProperty != null)
				{
					BoatMotorForceProperty.SetValue(value.Motor, value.Force, null);
				}
			}
			_boatMotorDefaults.Clear();
		}

		private void ApplyBaitOptions()
		{
			//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_005b: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			if (!IsHost || !_instantBite)
			{
				RestoreBaits();
				return;
			}
			foreach (BaitInfo allBait in GameInfo.AllBaits)
			{
				if (Object.op_Implicit((Object)(object)allBait))
				{
					EntityId entityId = ((Object)allBait).GetEntityId();
					if (!_baitDefaults.ContainsKey(entityId))
					{
						_baitDefaults[entityId] = new BaitDefaults
						{
							Bait = allBait,
							CatchTime = (Vector2)BaitCatchTimeField.GetValue(allBait),
							LostChance = GetFloat(BaitLostChanceField, allBait, 0f),
							RequireReeling = (bool)BaitRequireReelingField.GetValue(allBait)
						};
					}
					BaitCatchTimeField.SetValue(allBait, (object)new Vector2(0.1f, 0.2f));
					BaitLostChanceField.SetValue(allBait, 0f);
					BaitRequireReelingField.SetValue(allBait, false);
				}
			}
		}

		private void RestoreBaits()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			foreach (BaitDefaults value in _baitDefaults.Values)
			{
				if (Object.op_Implicit((Object)(object)value.Bait))
				{
					BaitCatchTimeField.SetValue(value.Bait, value.CatchTime);
					BaitLostChanceField.SetValue(value.Bait, value.LostChance);
					BaitRequireReelingField.SetValue(value.Bait, value.RequireReeling);
				}
			}
			_baitDefaults.Clear();
		}

		private void ApplySlapSpeed(DeadPlayer corpse)
		{
			if (!_fastSlap || !Object.op_Implicit((Object)(object)corpse))
			{
				RestoreModifiedSlapSpeed();
				return;
			}
			if ((Object)(object)_speedModifiedCorpse != (Object)(object)corpse)
			{
				RestoreModifiedSlapSpeed();
				_speedModifiedCorpse = corpse;
				_defaultResurrectSpeed = Mathf.Max(0.01f, GetFloat(DeadPlayerResurrectSpeedField, corpse, 0.33f));
			}
			SetFloat(DeadPlayerResurrectSpeedField, corpse, _defaultResurrectSpeed * _slapSpeed);
		}

		private void RestoreModifiedSlapSpeed()
		{
			if (Object.op_Implicit((Object)(object)_speedModifiedCorpse))
			{
				SetFloat(DeadPlayerResurrectSpeedField, _speedModifiedCorpse, _defaultResurrectSpeed);
			}
			_speedModifiedCorpse = null;
			_defaultResurrectSpeed = 0f;
		}

		private void RestoreSlapSpeed()
		{
			RestoreModifiedSlapSpeed();
			StopInfiniteSlap(_activeSlapCorpse);
		}

		internal bool TryRunInfiniteSlap(DeadPlayer corpse)
		{
			Player localPlayer = Player.LocalPlayer;
			DeadPlayer val = ((Object.op_Implicit((Object)(object)_selectedTeammate) && Object.op_Implicit((Object)(object)_selectedTeammate.Dying)) ? _selectedTeammate.Dying.DeadPlayer : null);
			if (!_autoSlap || !Object.op_Implicit((Object)(object)corpse) || !((Object)(object)corpse == (Object)(object)val) || !Object.op_Implicit((Object)(object)localPlayer) || !((Object)(object)((Item)corpse).Holder == (Object)(object)localPlayer) || !Object.op_Implicit((Object)(object)localPlayer.Holding) || !((Object)(object)localPlayer.Holding.HeldItem == (Object)(object)corpse) || !_selectedTeammate.Dying.IsDead)
			{
				if (Object.op_Implicit((Object)(object)corpse) && (Object)(object)corpse == (Object)(object)_activeSlapCorpse)
				{
					StopInfiniteSlap(corpse);
				}
				return false;
			}
			if ((Object)(object)_activeSlapCorpse != (Object)(object)corpse)
			{
				StopInfiniteSlap(_activeSlapCorpse);
				_activeSlapCorpse = corpse;
				_slapCycleStartTime = Time.unscaledTime;
				_lastSlapCycle = -1;
				_nextSlapRpcTime = 0f;
			}
			float num = (((Object)(object)_speedModifiedCorpse == (Object)(object)corpse && _defaultResurrectSpeed > 0f) ? _defaultResurrectSpeed : Mathf.Max(0.01f, GetFloat(DeadPlayerResurrectSpeedField, corpse, 0.33f)));
			float num2 = (_fastSlap ? _slapSpeed : 1f);
			float num3 = Mathf.Max(0f, Time.unscaledTime - _slapCycleStartTime) * num * num2;
			int num4 = Mathf.FloorToInt(num3 / 0.92f);
			float num5 = Mathf.Repeat(num3, 0.92f);
			if (_lastSlapCycle != num4)
			{
				_lastSlapCycle = num4;
				if (DeadPlayerResurrectPercentField != null)
				{
					DeadPlayerResurrectPercentField.SetValue(corpse, 0f);
				}
				if (DeadPlayerIsResurrectingField != null)
				{
					DeadPlayerIsResurrectingField.SetValue(corpse, true);
				}
				if (DeadPlayerStartSlapMethod != null)
				{
					DeadPlayerStartSlapMethod.Invoke(corpse, null);
				}
				if (HasServerConnection)
				{
					Server.Instance.UpdateDeadPlayerResurrectPercent(corpse, 0f, (Channel)0);
				}
			}
			if (DeadPlayerIsResurrectingField != null)
			{
				DeadPlayerIsResurrectingField.SetValue(corpse, true);
			}
			if (DeadPlayerResurrectPercentField != null)
			{
				DeadPlayerResurrectPercentField.SetValue(corpse, num5);
			}
			if (DeadPlayerUpdateSlapMethod != null)
			{
				DeadPlayerUpdateSlapMethod.Invoke(corpse, null);
			}
			if (HasServerConnection && Time.unscaledTime >= _nextSlapRpcTime)
			{
				_nextSlapRpcTime = Time.unscaledTime + 0.1f;
				Server.Instance.UpdateDeadPlayerResurrectPercent(corpse, num5, (Channel)0);
			}
			return true;
		}

		private void StopInfiniteSlap(DeadPlayer corpse)
		{
			if (!Object.op_Implicit((Object)(object)corpse))
			{
				_activeSlapCorpse = null;
				_lastSlapCycle = -1;
				return;
			}
			if (DeadPlayerIsResurrectingField != null)
			{
				DeadPlayerIsResurrectingField.SetValue(corpse, false);
			}
			if (DeadPlayerResurrectPercentField != null)
			{
				DeadPlayerResurrectPercentField.SetValue(corpse, 0f);
			}
			if (DeadPlayerStartSlapReturnMethod != null)
			{
				DeadPlayerStartSlapReturnMethod.Invoke(corpse, null);
			}
			if (HasServerConnection)
			{
				Server.Instance.UpdateDeadPlayerResurrectPercent(corpse, 0f, (Channel)0);
			}
			if ((Object)(object)_activeSlapCorpse == (Object)(object)corpse)
			{
				_activeSlapCorpse = null;
			}
			_lastSlapCycle = -1;
		}

		private void ApplyWeapon(Weapon weapon)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_00fd: 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)
			if (Object.op_Implicit((Object)(object)weapon))
			{
				EntityId entityId = ((Object)weapon).GetEntityId();
				if (!_weaponDefaults.ContainsKey(entityId))
				{
					_weaponDefaults[entityId] = new WeaponDefaults
					{
						Weapon = weapon,
						ShotDelay = GetFloat(WeaponShotDelayField, weapon, 0.2f),
						Spread = GetFloat(WeaponSpreadField, weapon, 0f),
						Recoil = GetInt(WeaponRecoilField, weapon, 0),
						ProjectileSpeed = GetFloat(WeaponProjectileSpeedField, weapon, 1f),
						ProjectileCount = GetInt(WeaponProjectileCountField, weapon, 1),
						FullAuto = GetBool(WeaponFullAutoField, weapon, fallback: false),
						NoShootDuringAnimation = GetBool(WeaponNoShootDuringAnimationField, weapon, fallback: false),
						NoQueueingShots = GetBool(WeaponNoQueueingShotsField, weapon, fallback: false)
					};
				}
				WeaponDefaults weaponDefaults = _weaponDefaults[entityId];
				float num = (_rapidFire ? 0.12f : (_customWeapon ? _weaponDelayMultiplier : 1f));
				SetFloat(WeaponShotDelayField, weapon, Math.Max(0.015f, weaponDefaults.ShotDelay * num));
				SetFloat(WeaponSpreadField, weapon, _noSpread ? 0f : (weaponDefaults.Spread * (_customWeapon ? _weaponSpreadMultiplier : 1f)));
				SetInt(WeaponRecoilField, weapon, (!_noSpread) ? Mathf.RoundToInt((float)weaponDefaults.Recoil * (_customWeapon ? _weaponRecoilMultiplier : 1f)) : 0);
				SetFloat(WeaponProjectileSpeedField, weapon, weaponDefaults.ProjectileSpeed * (_customWeapon ? _weaponProjectileSpeedMultiplier : 1f));
				SetInt(WeaponProjectileCountField, weapon, _customWeapon ? _weaponProjectileCount : weaponDefaults.ProjectileCount);
				SetBool(WeaponNoShootDuringAnimationField, weapon, !_skipBoltAction && weaponDefaults.NoShootDuringAnimation);
				SetBool(WeaponNoQueueingShotsField, weapon, !_skipBoltAction && !_forceFullAuto && weaponDefaults.NoQueueingShots);
				SetBool(WeaponFullAutoField, weapon, _forceFullAuto || weaponDefaults.FullAuto);
				if (_infiniteAmmo && WeaponAmmoProperty != null)
				{
					WeaponAmmoProperty.SetValue(weapon, 999, null);
				}
			}
		}

		private void ApplyRod(FishingRod rod)
		{
			//IL_0016: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)rod))
			{
				EntityId entityId = ((Object)rod).GetEntityId();
				if (!_rodDefaults.ContainsKey(entityId))
				{
					_rodDefaults[entityId] = new RodDefaults
					{
						Rod = rod,
						ReelSpeed = GetFloat(RodReelSpeedField, rod, 1f),
						ReelStep = GetFloat(RodReelStepField, rod, 1f),
						ThrowSpeed = GetFloat(RodThrowSpeedField, rod, 1f)
					};
				}
				RodDefaults rodDefaults = _rodDefaults[entityId];
				float num = (_fastFishing ? 6f : (_customRod ? _rodReelMultiplier : 1f));
				float num2 = (_fastFishing ? 6f : (_customRod ? _rodStepMultiplier : 1f));
				float num3 = (_fastFishing ? 6f : (_customRod ? _rodThrowMultiplier : 1f));
				SetFloat(RodReelSpeedField, rod, rodDefaults.ReelSpeed * num);
				SetFloat(RodReelStepField, rod, rodDefaults.ReelStep * num2);
				SetFloat(RodThrowSpeedField, rod, rodDefaults.ThrowSpeed * num3);
			}
		}

		private void RestoreAllWeapons()
		{
			foreach (WeaponDefaults value in _weaponDefaults.Values)
			{
				if (Object.op_Implicit((Object)(object)value.Weapon))
				{
					SetFloat(WeaponShotDelayField, value.Weapon, value.ShotDelay);
					SetFloat(WeaponSpreadField, value.Weapon, value.Spread);
					SetInt(WeaponRecoilField, value.Weapon, value.Recoil);
					SetFloat(WeaponProjectileSpeedField, value.Weapon, value.ProjectileSpeed);
					SetInt(WeaponProjectileCountField, value.Weapon, value.ProjectileCount);
					SetBool(WeaponFullAutoField, value.Weapon, value.FullAuto);
					SetBool(WeaponNoShootDuringAnimationField, value.Weapon, value.NoShootDuringAnimation);
					SetBool(WeaponNoQueueingShotsField, value.Weapon, value.NoQueueingShots);
				}
			}
			_weaponDefaults.Clear();
		}

		private void RestoreAllRods()
		{
			foreach (RodDefaults value in _rodDefaults.Values)
			{
				if (Object.op_Implicit((Object)(object)value.Rod))
				{
					SetFloat(RodReelSpeedField, value.Rod, value.ReelSpeed);
					SetFloat(RodReelStepField, value.Rod, value.ReelStep);
					SetFloat(RodThrowSpeedField, value.Rod, value.ThrowSpeed);
				}
			}
			_rodDefaults.Clear();
		}

		internal void ApplyFlightAfterPhysics(PlayerMovement movement)
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: 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_00d9: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: 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_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: 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_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			Player localPlayer = Player.LocalPlayer;
			if (!Object.op_Implicit((Object)(object)localPlayer) || (Object)(object)localPlayer.Movement != (Object)(object)movement || !Object.op_Implicit((Object)(object)localPlayer.Rigidbody))
			{
				return;
			}
			if (!_flight)
			{
				if (_flightWasActive)
				{
					localPlayer.Rigidbody.useGravity = true;
					_flightWasActive = false;
				}
				return;
			}
			_flightWasActive = true;
			localPlayer.Rigidbody.useGravity = false;
			Transform val = (Object.op_Implicit((Object)(object)localPlayer.CurCam) ? ((Component)localPlayer.CurCam).transform : localPlayer.Transform);
			Vector3 val2 = Vector3.ProjectOnPlane(val.forward, Vector3.up);
			Vector3 normalized = ((Vector3)(ref val2)).normalized;
			val2 = Vector3.ProjectOnPlane(val.right, Vector3.up);
			Vector3 normalized2 = ((Vector3)(ref val2)).normalized;
			Vector3 val3 = normalized * Input.GetAxisRaw("Vertical") + normalized2 * Input.GetAxisRaw("Horizontal");
			if (Input.GetKey((KeyCode)32))
			{
				val3 += Vector3.up;
			}
			if (Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)305))
			{
				val3 += Vector3.down;
			}
			localPlayer.Rigidbody.linearVelocity = ((((Vector3)(ref val3)).sqrMagnitude > 0f) ? (((Vector3)(ref val3)).normalized * _flightSpeed) : Vector3.zero);
			localPlayer.Rigidbody.angularVelocity = Vector3.zero;
		}

		private void RestoreFlight()
		{
			Player localPlayer = Player.LocalPlayer;
			if (_flightWasActive && Object.op_Implicit((Object)(object)localPlayer) && Object.op_Implicit((Object)(object)localPlayer.Rigidbody))
			{
				localPlayer.Rigidbody.useGravity = true;
			}
			_flightWasActive = false;
		}

		private void LoadConfig()
		{
			SyncPrimitiveSettings(load: true);
		}

		private void SyncPrimitiveSettings(bool load)
		{
			BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.NonPublic;
			FieldInfo[] fields = typeof(TrainerPlugin).GetFields(bindingAttr);
			foreach (FieldInfo fieldInfo in fields)
			{
				if (fieldInfo.IsStatic || fieldInfo.Name == "_status" || fieldInfo.Name.StartsWith("_next") || fieldInfo.Name.StartsWith("_cached"))
				{
					continue;
				}
				object value = fieldInfo.GetValue(this);
				if (fieldInfo.FieldType == typeof(bool))
				{
					ConfigEntry<bool> val = _config.Bind<bool>("Settings", fieldInfo.Name, (bool)value, "Trainer setting");
					if (load)
					{
						fieldInfo.SetValue(this, val.Value);
					}
					else
					{
						val.Value = (bool)value;
					}
				}
				else if (fieldInfo.FieldType == typeof(int))
				{
					ConfigEntry<int> val2 = _config.Bind<int>("Settings", fieldInfo.Name, (int)value, "Trainer setting");
					if (load)
					{
						fieldInfo.SetValue(this, val2.Value);
					}
					else
					{
						val2.Value = (int)value;
					}
				}
				else if (fieldInfo.FieldType == typeof(float))
				{
					ConfigEntry<float> val3 = _config.Bind<float>("Settings", fieldInfo.Name, (float)value, "Trainer setting");
					if (load)
					{
						fieldInfo.SetValue(this, val3.Value);
					}
					else
					{
						val3.Value = (float)value;
					}
				}
				else if (fieldInfo.FieldType == typeof(string) && value != null)
				{
					ConfigEntry<string> val4 = _config.Bind<string>("Settings", fieldInfo.Name, (string)value, "Trainer setting");
					if (load)
					{
						fieldInfo.SetValue(this, val4.Value);
					}
					else
					{
						val4.Value = (string)value;
					}
				}
			}
		}

		private void InitializeKeyBindings()
		{
			_keyBindings = new List<KeyBinding>
			{
				new KeyBinding("无敌", "_selfGod"),
				new KeyBinding("保持状态满值", "_keepVitalsFull"),
				new KeyBinding("飞行", "_flight"),
				new KeyBinding("无限弹药", "_infiniteAmmo"),
				new KeyBinding("无后坐力", "_noSpread"),
				new KeyBinding("快速射击", "_rapidFire"),
				new KeyBinding("快速钓鱼", "_fastFishing"),
				new KeyBinding("瞬间咬钩", "_instantBite"),
				new KeyBinding("透视", "_espEnabled"),
				new KeyBinding("自瞄", "_strongAim"),
				new KeyBinding("魔法子弹", "_magicBullet"),
				new KeyBinding("轮盘必胜", "_rouletteAlwaysWin"),
				new KeyBinding("一键复活全员", "__reviveAll")
			};
			foreach (KeyBinding keyBinding in _keyBindings)
			{
				keyBinding.Config = _config.Bind<KeyCode>("Keybinds", keyBinding.FieldName, (KeyCode)0, "修改器功能按键;按 Esc 清除绑定");
			}
		}

		private void ProcessKeyBindings()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			if (_listeningBinding >= 0 || !Application.isFocused)
			{
				return;
			}
			foreach (KeyBinding keyBinding in _keyBindings)
			{
				if ((int)keyBinding.Config.Value == 0 || !Input.GetKeyDown(keyBinding.Config.Value))
				{
					continue;
				}
				if (keyBinding.FieldName == "__reviveAll")
				{
					ReviveAllPlayers();
					continue;
				}
				FieldInfo fieldInfo = AccessTools.Field(typeof(TrainerPlugin), keyBinding.FieldName);
				if (fieldInfo != null && fieldInfo.FieldType == typeof(bool))
				{
					fieldInfo.SetValue(this, !(bool)fieldInfo.GetValue(this));
				}
			}
		}

		internal void PrepareWeaponForShot(Weapon weapon)
		{
			ApplyWeapon(weapon);
			if (Object.op_Implicit((Object)(object)weapon) && _noSpread)
			{
				SetFloat(WeaponSpreadField, weapon, 0f);
				SetInt(WeaponRecoilField, weapon, 0);
			}
		}

		private void DrawKeyBindings()
		{
			//IL_007f: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			BeginUiCard(_useEnglish ? "Function Key Bindings" : "功能按键绑定", _useEnglish ? "Click Set, then press any key. Press Esc to clear the binding." : "点击设置后按任意键绑定;按 Esc 清除当前绑定。");
			for (int i = 0; i < _keyBindings.Count; i++)
			{
				KeyBinding keyBinding = _keyBindings[i];
				GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
				GUILayout.Label(GetKeyBindingLabel(keyBinding), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(170f) });
				GUILayout.Label((_listeningBinding != i) ? (((int)keyBinding.Config.Value != 0) ? ((object)keyBinding.Config.Value/*cast due to .constrained prefix*/).ToString() : (_useEnglish ? "Unbound" : "未绑定")) : (_useEnglish ? "Press a key..." : "请按键..."), _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) });
				if (GUILayout.Button((_listeningBinding != i) ? (_useEnglish ? "Set" : "设置") : (_useEnglish ? "Cancel" : "取消"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) }))
				{
					_listeningBinding = ((_listeningBinding == i) ? (-1) : i);
				}
				if (GUILayout.Button(_useEnglish ? "Clear" : "清除", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) }))
				{
					keyBinding.Config.Value = (KeyCode)0;
					_listeningBinding = -1;
				}
				GUILayout.EndHorizontal();
			}
			EndUiCard();
		}

		private string GetKeyBindingLabel(KeyBinding binding)
		{
			if (!_useEnglish)
			{
				return binding.Label;
			}
			return binding.FieldName switch
			{
				"_selfGod" => "God Mode", 
				"_keepVitalsFull" => "Keep Vitals Full", 
				"_flight" => "Flight", 
				"_infiniteAmmo" => "Infinite Ammo", 
				"_noSpread" => "No Spread", 
				"_rapidFire" => "Rapid Fire", 
				"_fastFishing" => "Fast Fishing", 
				"_instantBite" => "Instant Bite", 
				"_espEnabled" => "ESP", 
				"_strongAim" => "Aimbot", 
				"_magicBullet" => "Magic Bullet", 
				"_rouletteAlwaysWin" => "Roulette Always Win", 
				"__reviveAll" => "Revive All Players", 
				_ => binding.Label, 
			};
		}

		private void CaptureKeyBinding()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Invalid comparison between Unknown and I4
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Invalid comparison between Unknown and I4
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			if (_listeningBinding >= 0 && _listeningBinding < _keyBindings.Count && (int)Event.current.type == 4)
			{
				KeyBinding keyBinding = _keyBindings[_listeningBinding];
				keyBinding.Config.Value = (KeyCode)(((int)Event.current.keyCode != 27) ? ((int)Event.current.keyCode) : 0);
				_listeningBinding = -1;
				Event.current.Use();
			}
		}

		private string T(string key, params object[] args)
		{
			string key2 = (_useEnglish ? "en" : "zh");
			if (_localizationDict.TryGetValue(key2, out var value) && value.TryGetValue(key, out var value2))
			{
				return (args != null && args.Length != 0) ? string.Format(value2, args) : value2;
			}
			if (_localizationDict.TryGetValue("zh", out var value3) && value3.TryGetValue(key, out var value4))
			{
				return (args != null && args.Length != 0) ? string.Format(value4, args) : value4;
			}
			return key;
		}

		private void OnGUI()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Invalid comparison between Unknown and I4
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Expected O, but got Unknown
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			EnsureUiResources();
			if (_espEnabled)
			{
				DrawEsp();
			}
			DrawOverlayHud();
			if (_islandEspEnabled)
			{
				DrawIslandOverlay();
			}
			if (_menuVisible)
			{
				if (!_isMenuMouseUnlocked || (int)Cursor.lockState > 0)
				{
					Cursor.lockState = (CursorLockMode)0;
					Cursor.visible = true;
					PlayerCamera.ToggleMouse(true);
					_isMenuMouseUnlocked = true;
				}
				GUISkin skin = GUI.skin;
				GUI.skin = _uiSkin;
				GUI.depth = -1000;
				CaptureKeyBinding();
				float num = 980f;
				float num2 = 680f;
				float num3 = Mathf.Max(num, (float)Screen.width - 20f);
				float num4 = Mathf.Max(num2, (float)Screen.height - 20f);
				((Rect)(ref _window)).width = Mathf.Clamp(((Rect)(ref _window)).width, num, num3);
				((Rect)(ref _window)).height = Mathf.Clamp(((Rect)(ref _window)).height, num2, num4);
				((Rect)(ref _window)).x = Mathf.Clamp(((Rect)(ref _window)).x, 0f, Mathf.Max(0f, (float)Screen.width - ((Rect)(ref _window)).width));
				((Rect)(ref _window)).y = Mathf.Clamp(((Rect)(ref _window)).y, 0f, Mathf.Max(0f, (float)Screen.height - 40f));
				GUI.FocusWindow(987612);
				_window = GUI.Window(987612, _window, new WindowFunction(DrawWindow), GUIContent.none, _windowStyle);
				HandleWindowResize();
				GUI.skin = skin;
			}
		}

		private void HandleWindowResize()
		{
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00d6: 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_00e2: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Invalid comparison between Unknown and I4
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Invalid comparison between Unknown and I4
			//IL_0113: 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)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)