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("codex.howtofish.trainer", "Boom This HowToFish - By Me0wws", "1.3")] 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; } internal static TrainerPlugin Instance; private bool _useEnglish = true; private readonly Dictionary> _localizationDict = new Dictionary> { { "zh", new Dictionary { { "menu.title", "Boom This HowToFish - By Me0wws" }, { "menu.opened", "菜单已打开(F1/Insert 关闭)" }, { "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 / Insert 关闭" }, { "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", "重载游戏场景" }, { "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" }, { "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", "已切换为" } } }, { "en", new Dictionary { { "menu.title", "Boom This HowToFish - By Me0wws" }, { "menu.opened", "Menu opened (F1/Insert 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 / Insert 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" }, { "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.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" }, { "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 │ Spawn item │\n│ spawndead │ Spawn dead creature │\n│ spawndrip │ Spawn shiny creature │\n│ grill │ Unlock grill │\n│ boat │ Unlock boat/radar/motor │\n│ addmoney │ Add money │\n│ removemoney │ 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}" }, { "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" }, { "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" }, { "status.lang_switched", "Switched to" } } } }; public const string PluginGuid = "codex.howtofish.trainer"; public const string PluginName = "Boom This HowToFish - By Me0wws"; public const string PluginVersion = "1.3"; 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 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 或 Insert 打开修改器"; private Vector3 _savedPosition; private bool _hasSavedPosition; private CursorLockMode _previousCursorLock; private bool _previousCursorVisible; private PlayerMovement _cachedMovement; private MovementDefaults _movementDefaults; private PlayerAimAssist _cachedAim; private AimDefaults _aimDefaults; private readonly Dictionary _weaponDefaults = new Dictionary(); private readonly Dictionary _rodDefaults = new Dictionary(); private readonly Dictionary _boatMotorDefaults = new Dictionary(); private readonly Dictionary _baitDefaults = new Dictionary(); private List _items = new List(); 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 _aimCandidates = new List(); 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 _badgeStyle; private GUIStyle _cardStyle; private readonly List _uiTextures = new List(); 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"); internal bool SelfGodEnabled => _selfGod; internal bool StrongAimEnabled => _strongAim; 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown Instance = this; _maxPlayers = 8; _maxPlayersText = _maxPlayers.ToString(); _fpsLimitText = "60"; LoadConfig(); InitializeCrosshair(); _harmony = new Harmony("codex.howtofish.trainer"); _harmony.PatchAll(typeof(TrainerPlugin).Assembly); ClientSettings.ToggleCheats(true); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Boom This HowToFish - By Me0wws v1.3 已加载; F1 或 Insert 切换菜单。"); } 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(); Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } Instance = null; } private void Update() { if (MenuHotkeyPressed() && Time.unscaledTime >= _nextMenuHotkeyTime) { _nextMenuHotkeyTime = Time.unscaledTime + 0.35f; ToggleMenu(); } 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_0044: 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; } else { Cursor.lockState = _previousCursorLock; Cursor.visible = _previousCursorVisible; } SetStatus(_menuVisible ? T("menu.opened") : T("menu.closed")); } 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() { _config.Save(); } 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) if (_espEnabled) { DrawEsp(); } if (_menuVisible) { EnsureUiResources(); GUISkin skin = GUI.skin; GUI.skin = _uiSkin; GUI.depth = -1000; 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)); _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) //IL_015b: Unknown result type (might be due to invalid IL or missing references) Event current = Event.current; float num = 12f; Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref _window)).xMax - num, ((Rect)(ref _window)).yMin, num, ((Rect)(ref _window)).height); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref _window)).xMin, ((Rect)(ref _window)).yMax - num, ((Rect)(ref _window)).width, num); Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(((Rect)(ref _window)).xMax - num, ((Rect)(ref _window)).yMax - num, num, num); bool flag = ((Rect)(ref val3)).Contains(current.mousePosition); bool flag2 = ((Rect)(ref val)).Contains(current.mousePosition); bool flag3 = ((Rect)(ref val2)).Contains(current.mousePosition); if ((int)current.type == 0 && (flag || flag2 || flag3)) { _isResizing = true; _resizeStartMouse = current.mousePosition; _resizeStartRect = _window; current.Use(); } if (_isResizing && (int)current.type == 3) { Vector2 val4 = current.mousePosition - _resizeStartMouse; float width = Mathf.Clamp(((Rect)(ref _resizeStartRect)).width + val4.x, 980f, (float)Screen.width - 20f); float height = Mathf.Clamp(((Rect)(ref _resizeStartRect)).height + val4.y, 680f, (float)Screen.height - 20f); ((Rect)(ref _window)).width = width; ((Rect)(ref _window)).height = height; current.Use(); } if ((int)current.type == 1 && _isResizing) { _isResizing = false; current.Use(); } } private void DrawWindow(int id) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.LocalPlayer; string text = (IsHost ? T("status.host") : (HasServerConnection ? T("status.client") : T("status.none"))); float num = 68f; float num2 = 44f; float num3 = 210f; float num4 = 12f; float num5 = num + num4; float num6 = ((Rect)(ref _window)).height - num5 - num2 - num4; GUILayout.BeginArea(new Rect(0f, 0f, ((Rect)(ref _window)).width, num), GUIContent.none, _headerStyle); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("menu.title"), _titleStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); GUILayout.Label("v1.3", _badgeStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(72f), GUILayout.Height(28f) }); GUILayout.FlexibleSpace(); if (GUILayout.Button(T("menu.lang_switch"), _badgeStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(120f), GUILayout.Height(28f) })) { _useEnglish = !_useEnglish; SetStatus(T("status.lang_switched") + " " + (_useEnglish ? "English" : "中文")); } GUILayout.Space(8f); GUILayout.Label("● " + text, _badgeStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(false), GUILayout.Height(28f) }); GUILayout.Space(10f); GUILayout.Label(T("menu.player") + (Object.op_Implicit((Object)(object)localPlayer) ? localPlayer.SteamName : T("menu.none")), _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); GUILayout.Space(14f); GUILayout.Label(T("menu.money") + MoneyManager.Money, _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); GUILayout.EndHorizontal(); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(num4, num5, num3, num6), GUIContent.none, _sidebarStyle); GUILayout.Label(T("menu.categories"), _sectionTitleStyle, Array.Empty()); GUILayout.Space(6f); string[] array = new string[7] { T("tab.player"), T("tab.items"), T("tab.teammates"), T("tab.combat"), T("tab.esp"), T("tab.casino"), T("tab.other") }; for (int i = 0; i < array.Length; i++) { if (GUILayout.Button((i + 1).ToString("00", CultureInfo.InvariantCulture) + " " + array[i], (_tab == i) ? _navActiveStyle : _navStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(46f) })) { if (_tab != i) { _mainScroll = Vector2.zero; } _tab = i; } GUILayout.Space(4f); } GUILayout.FlexibleSpace(); GUILayout.Label(T("menu.scope"), _sectionTitleStyle, Array.Empty()); GUILayout.Label(T("menu.scope_desc"), _mutedStyle, Array.Empty()); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(num3 + num4 * 2f, num5, ((Rect)(ref _window)).width - num3 - num4 * 3f, num6), GUIContent.none, _contentStyle); GUILayout.Label(GetPageTitle(_tab), _pageTitleStyle, Array.Empty()); GUILayout.Label(GetPageDescription(_tab), _mutedStyle, Array.Empty()); GUILayout.Space(8f); _mainScroll = GUILayout.BeginScrollView(_mainScroll, false, true, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandHeight(true) }); switch (_tab) { case 0: DrawResources(localPlayer); break; case 1: DrawItems(localPlayer); break; case 2: DrawTeammates(localPlayer); DrawWorld(localPlayer); break; case 3: DrawCombat(localPlayer); break; case 4: DrawEspAimAndCrosshair(); break; case 5: DrawCasinoAndCommands(); break; case 6: DrawOtherSettings(); break; } GUILayout.EndScrollView(); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(0f, ((Rect)(ref _window)).height - num2, ((Rect)(ref _window)).width, num2), GUIContent.none, _footerStyle); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("●", _statusStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(16f) }); GUILayout.Label(_status, _statusStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Label(T("menu.close_hint"), _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); GUILayout.EndHorizontal(); GUILayout.EndArea(); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _window)).width, num)); } private string GetPageTitle(int tab) { return tab switch { 0 => T("tab.player"), 1 => T("tab.items"), 2 => T("tab.teammates"), 3 => T("tab.combat"), 4 => T("tab.esp"), 5 => T("tab.casino"), 6 => T("tab.other"), _ => T("tab.casino"), }; } private string GetPageDescription(int tab) { return tab switch { 0 => T("desc.player"), 1 => T("desc.items"), 2 => T("desc.teammates"), 3 => T("desc.combat"), 4 => T("desc.esp"), 5 => T("desc.casino"), 6 => T("desc.other"), _ => T("desc.casino"), }; } private void BeginUiCard(string title, string description = null) { GUILayout.BeginVertical(_cardStyle, Array.Empty()); GUILayout.Label(title, _sectionTitleStyle, Array.Empty()); if (!string.IsNullOrEmpty(description)) { GUILayout.Label(description, _mutedStyle, Array.Empty()); } GUILayout.Space(5f); } private static void EndUiCard() { GUILayout.EndVertical(); GUILayout.Space(10f); } private void DrawResources(Player player) { BeginUiCard(T("card.money"), T("card.money_desc")); GUILayout.BeginHorizontal(Array.Empty()); _moneyText = GUILayout.TextField(_moneyText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); if (GUILayout.Button(T("btn.add"), Array.Empty())) { HostAddMoney(player, add: true); } if (GUILayout.Button(T("btn.remove"), Array.Empty())) { HostAddMoney(player, add: false); } if (GUILayout.Button(T("btn.set"), Array.Empty())) { HostSetMoney(); } GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.vitals")); GUI.enabled = IsHost && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.fill_vitals"), Array.Empty())) { FillVitals(player); } GUI.enabled = true; _selfGod = GUILayout.Toggle(_selfGod, T("toggle.godmode"), Array.Empty()); _keepVitalsFull = GUILayout.Toggle(_keepVitalsFull, T("toggle.keep_full"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = IsHost; if (GUILayout.Button(T("btn.godmode_global") + PlayerManager.InGodMode, Array.Empty())) { PlayerManager.ToggleGodMode(); SetStatus(T("status.godmode") + PlayerManager.InGodMode); } bool flag = Object.op_Implicit((Object)(object)ServerSettings.Instance) && ServerSettings.OneShotEnabled; if (GUILayout.Button(T("btn.oneshot") + flag, Array.Empty())) { ServerSettings.Instance.ToggleOneShot(); SetStatus(T("status.oneshot") + !flag); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.movement"), T("card.movement_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.move_mult"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); _moveText = GUILayout.TextField(_moveText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { _moveMultiplier = ParseClamped(_moveText, 1f, 0.1f, 20f); _moveText = _moveMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.move") + _moveText); } GUILayout.Label(T("label.jump_mult"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); _jumpText = GUILayout.TextField(_jumpText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { _jumpMultiplier = ParseClamped(_jumpText, 1f, 0.1f, 20f); _jumpText = _jumpMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.jump") + _jumpText); } if (GUILayout.Button(T("btn.reset"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { _moveMultiplier = (_jumpMultiplier = 1f); _moveText = (_jumpText = "1"); SetStatus(T("status.move_reset")); } GUILayout.EndHorizontal(); EndUiCard(); } private void DrawItems(Player player) { //IL_0289: Unknown result type (might be due to invalid IL or missing references) BeginUiCard(T("card.items"), T("card.items_desc")); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button(T("btn.refresh_items"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) })) { RefreshItems(forced: true); _itemPage = 0; } string itemFilter = _itemFilter; _itemFilter = GUILayout.TextField(_itemFilter, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (!string.Equals(itemFilter, _itemFilter, StringComparison.OrdinalIgnoreCase)) { _itemPage = 0; } if (GUILayout.Button(T("btn.clear_filter"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) })) { _itemFilter = ""; _itemPage = 0; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.unlock_baits"), Array.Empty())) { UnlockAllBaits(player); } GUI.enabled = IsHost && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.unlock_pockets"), Array.Empty())) { UnlockAllPockets(player); } GUI.enabled = true; GUILayout.EndHorizontal(); RefreshItems(forced: false); string filter = (_itemFilter ?? "").Trim(); List list = _items.Where((Item item) => Object.op_Implicit((Object)(object)item) && (filter.Length == 0 || $"ID {item.ID:000} | {((Object)item).name} | 类型 {item.Type} | 价格 {item.Cost} | 价值 {item.DefaultWorth}".IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)).ToList(); int num = Math.Max(1, (list.Count + 12 - 1) / 12); _itemPage = Mathf.Clamp(_itemPage, 0, num - 1); GUILayout.Label(string.Format(T("label.items_count"), list.Count, num), Array.Empty()); foreach (Item item in list.Skip(_itemPage * 12).Take(12)) { string text = $"ID {item.ID:000} | {((Object)item).name} | 类型 {item.Type} | 价格 {item.Cost} | 价值 {item.DefaultWorth}"; GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.spawn") + " " + text, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { SpawnHeld(item, player); } GUI.enabled = true; } GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = _itemPage > 0; if (GUILayout.Button(T("btn.prev"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { _itemPage--; } GUI.enabled = true; GUILayout.FlexibleSpace(); GUILayout.Label(string.Format(T("label.page"), _itemPage + 1, num), _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.FlexibleSpace(); GUI.enabled = _itemPage < num - 1; if (GUILayout.Button(T("btn.next"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { _itemPage++; } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); Item val = ((Object.op_Implicit((Object)(object)player) && Object.op_Implicit((Object)(object)player.Holding)) ? player.Holding.HeldItem : null); BeginUiCard(T("card.held"), T("card.held_desc") + (Object.op_Implicit((Object)(object)val) ? ((Object)val).name : T("menu.none"))); GUILayout.BeginHorizontal(Array.Empty()); _itemWeightText = GUILayout.TextField(_itemWeightText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUI.enabled = IsHost && Object.op_Implicit((Object)(object)val); if (GUILayout.Button(T("btn.set_weight"), Array.Empty())) { SetHeldWeight(val); } if (GUILayout.Button(T("btn.raw"), Array.Empty())) { SetHeldCookness(val, 0f); } if (GUILayout.Button(T("btn.perfect"), Array.Empty())) { SetHeldCookness(val, 1f); } if (GUILayout.Button(T("btn.burnt"), Array.Empty())) { SetHeldCookness(val, 2f); } GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)val); if (GUILayout.Button(T("btn.next_skin"), Array.Empty())) { NextHeldSkin(val); } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); _itemMultiplierText = GUILayout.TextField(_itemMultiplierText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)val); if (GUILayout.Button(T("btn.kill_mult"), Array.Empty())) { SetHeldKillMultiplier(val); } _betMultiplierText = GUILayout.TextField(_betMultiplierText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUI.enabled = IsHost && Object.op_Implicit((Object)(object)val); if (GUILayout.Button(T("btn.bet_mult"), Array.Empty())) { SetHeldBetMultiplier(val); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); DrawSkinUnlocker(); } private void DrawSkinUnlocker() { BeginUiCard(T("card.skins"), T("card.skins_desc")); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button(T("btn.unlock_all_skins"), Array.Empty())) { UnlockAllItemSkins(); } if (GUILayout.Button(T("btn.unlock_clothes"), Array.Empty())) { UnlockAllCharacterClothes(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.item_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _skinItemIdText = GUILayout.TextField(_skinItemIdText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUILayout.Label(T("label.skin_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _skinIndexText = GUILayout.TextField(_skinIndexText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); if (GUILayout.Button(T("btn.unlock_skin"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) })) { UnlockSelectedSkin(); } GUILayout.Space(12f); string skinFilter = _skinFilter; _skinFilter = GUILayout.TextField(_skinFilter, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (!string.Equals(skinFilter, _skinFilter, StringComparison.OrdinalIgnoreCase)) { _skinPage = 0; } if (GUILayout.Button(T("btn.clear_filter"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) })) { _skinFilter = ""; _skinPage = 0; } GUILayout.EndHorizontal(); List list = BuildSkinEntries(); string filter = (_skinFilter ?? "").Trim(); if (filter.Length > 0) { list = list.Where((SkinEntry entry) => entry.Display.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0).ToList(); } int num = Math.Max(1, (list.Count + 10 - 1) / 10); _skinPage = Mathf.Clamp(_skinPage, 0, num - 1); GUILayout.Label(string.Format(T("label.skins_count"), list.Count), Array.Empty()); foreach (SkinEntry item in list.Skip(_skinPage * 10).Take(10)) { if (GUILayout.Button(T("btn.unlock") + " " + item.Display, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { UnlockSkin(item.ItemId, item.SkinId, item.Display); } } GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = _skinPage > 0; if (GUILayout.Button(T("btn.prev"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { _skinPage--; } GUI.enabled = true; GUILayout.FlexibleSpace(); GUILayout.Label(string.Format(T("label.page"), _skinPage + 1, num), _mutedStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.FlexibleSpace(); GUI.enabled = _skinPage < num - 1; if (GUILayout.Button(T("btn.next"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { _skinPage++; } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); } private void DrawWorld(Player player) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) BeginUiCard(T("card.teleport"), T("card.teleport_desc")); if (Object.op_Implicit((Object)(object)player)) { Vector3 position = player.Transform.position; GUILayout.Label(string.Format(T("label.coords"), position.x.ToString("0.00"), position.y.ToString("0.00"), position.z.ToString("0.00")), Array.Empty()); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("X", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(18f) }); _teleportX = GUILayout.TextField(_teleportX, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.Label("Y", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(18f) }); _teleportY = GUILayout.TextField(_teleportY, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.Label("Z", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(18f) }); _teleportZ = GUILayout.TextField(_teleportZ, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.teleport"), Array.Empty())) { TeleportToFields(player); } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.save_pos"), Array.Empty())) { _savedPosition = player.Transform.position; _hasSavedPosition = true; SetStatus(T("status.saved_pos") + FormatVector(_savedPosition)); } GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)player) && _hasSavedPosition; if (GUILayout.Button(T("btn.return_pos"), Array.Empty())) { Teleport(player, _savedPosition); } GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)player); if (GUILayout.Button(T("btn.forward"), Array.Empty())) { Transform val = (Object.op_Implicit((Object)(object)player.CurCam) ? ((Component)player.CurCam).transform : player.Transform); Teleport(player, player.Transform.position + val.forward * 10f); } if (GUILayout.Button(T("btn.to_boat"), Array.Empty())) { if (Object.op_Implicit((Object)(object)BoatManager.Boat)) { Teleport(player, ((Component)BoatManager.Boat).transform.position + Vector3.up * 3f); } else { SetStatus(T("status.no_boat")); } } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.world"), T("card.world_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = IsHost; if (GUILayout.Button(T("btn.unlock_boat"), Array.Empty())) { UnlockBoat(); } if (GUILayout.Button(T("btn.unlock_grill"), Array.Empty())) { NPCManager.UnlockGrill(); SetStatus(T("status.grill_unlocked")); } if (GUILayout.Button(T("btn.prev_island"), Array.Empty())) { OnlineIslandManager.TpToNextIsland(true); SetStatus(T("status.prev_island")); } if (GUILayout.Button(T("btn.next_island"), Array.Empty())) { OnlineIslandManager.TpToNextIsland(false); SetStatus(T("status.next_island")); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.boat")); GUILayout.BeginHorizontal(Array.Empty()); _boatBoost = GUILayout.Toggle(_boatBoost, T("toggle.boat_boost"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(210f) }); _boatText = GUILayout.TextField(_boatText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); if (GUILayout.Button(T("btn.apply_mult"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) })) { _boatMultiplier = ParseClamped(_boatText, 1f, 0.1f, 20f); _boatText = _boatMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.boat_mult") + _boatText); } GUILayout.EndHorizontal(); EndUiCard(); } private void DrawTeammates(Player localPlayer) { //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) List list = PlayerManager.OtherPlayers.Where((Player p) => Object.op_Implicit((Object)(object)p) && !((NetworkBehaviour)p).IsDeinitializing).ToList(); if (Object.op_Implicit((Object)(object)_selectedTeammate) && !list.Contains(_selectedTeammate)) { _selectedTeammate = null; } BeginUiCard(T("card.teammates"), T("card.teammates_desc")); GUILayout.BeginHorizontal(Array.Empty()); foreach (Player item in list) { GUI.enabled = (Object)(object)item != (Object)(object)_selectedTeammate; if (GUILayout.Button(item.SteamName + (item.Dying.IsDead ? T("label.downed") : ""), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { _selectedTeammate = item; } } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Label(T("label.selected") + (Object.op_Implicit((Object)(object)_selectedTeammate) ? _selectedTeammate.SteamName : T("menu.none")), Array.Empty()); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)localPlayer) && Object.op_Implicit((Object)(object)_selectedTeammate); if (GUILayout.Button(T("btn.pull_here"), Array.Empty())) { TeleportPlayerNear(_selectedTeammate, localPlayer.Transform.position + localPlayer.Transform.right * 1.5f); } if (GUILayout.Button(T("btn.go_to_teammate"), Array.Empty())) { TeleportPlayerNear(localPlayer, _selectedTeammate.Transform.position + _selectedTeammate.Transform.right * 1.5f); } if (GUILayout.Button(T("btn.throw_forward"), Array.Empty())) { Transform val = (Object.op_Implicit((Object)(object)localPlayer.CurCam) ? ((Component)localPlayer.CurCam).transform : localPlayer.Transform); TeleportPlayerNear(_selectedTeammate, val.position + val.forward * 10f); } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.item_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); _teammateItemIdText = GUILayout.TextField(_teammateItemIdText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)_selectedTeammate); if (GUILayout.Button(T("btn.give_item"), Array.Empty())) { GiveItemToPlayer(_selectedTeammate, _teammateItemIdText); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.revive")); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)_selectedTeammate) && _selectedTeammate.Dying.IsDead; if (GUILayout.Button(T("btn.revive"), Array.Empty())) { RevivePlayer(_selectedTeammate); } GUI.enabled = HasServerConnection; if (GUILayout.Button(T("btn.revive_all"), Array.Empty())) { ReviveAllPlayers(); } GUI.enabled = IsHost && Object.op_Implicit((Object)(object)localPlayer); if (GUILayout.Button(T("btn.clear_self"), Array.Empty())) { ClearAbnormalState(localPlayer); } GUI.enabled = IsHost && Object.op_Implicit((Object)(object)_selectedTeammate); if (GUILayout.Button(T("btn.clear_teammate"), Array.Empty())) { ClearAbnormalState(_selectedTeammate); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); DeadPlayer val2 = ((Object.op_Implicit((Object)(object)_selectedTeammate) && Object.op_Implicit((Object)(object)_selectedTeammate.Dying)) ? _selectedTeammate.Dying.DeadPlayer : null); bool flag = Object.op_Implicit((Object)(object)localPlayer) && Object.op_Implicit((Object)(object)localPlayer.Holding) && (Object)(object)localPlayer.Holding.HeldItem == (Object)(object)val2; BeginUiCard(T("card.slap"), T("card.slap_desc")); _autoSlap = GUILayout.Toggle(_autoSlap, T("toggle.auto_slap"), Array.Empty()); _fastSlap = GUILayout.Toggle(_fastSlap, T("toggle.fast_slap"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.speed_mult"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); _slapSpeedText = GUILayout.TextField(_slapSpeedText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) })) { _slapSpeed = ParseClamped(_slapSpeedText, 4f, 0.5f, 12f); _slapSpeedText = _slapSpeed.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.slap_speed") + _slapSpeedText); } GUILayout.Label(flag ? T("label.holding") : T("label.waiting"), _mutedStyle, Array.Empty()); GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.flight"), T("card.flight_desc")); GUILayout.BeginHorizontal(Array.Empty()); _flight = GUILayout.Toggle(_flight, T("toggle.flight"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); GUILayout.Label(T("label.speed"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _flightSpeedText = GUILayout.TextField(_flightSpeedText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) })) { _flightSpeed = ParseClamped(_flightSpeedText, 15f, 1f, 200f); _flightSpeedText = _flightSpeed.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.flight_speed") + _flightSpeedText); } GUILayout.EndHorizontal(); EndUiCard(); } private void DrawCombat(Player player) { BeginUiCard(T("card.weapon"), T("card.weapon_desc")); _infiniteAmmo = GUILayout.Toggle(_infiniteAmmo, T("toggle.infinite_ammo"), Array.Empty()); _noSpread = GUILayout.Toggle(_noSpread, T("toggle.no_spread"), Array.Empty()); _rapidFire = GUILayout.Toggle(_rapidFire, T("toggle.rapid_fire"), Array.Empty()); _skipBoltAction = GUILayout.Toggle(_skipBoltAction, T("toggle.skip_bolt"), Array.Empty()); _forceFullAuto = GUILayout.Toggle(_forceFullAuto, T("toggle.force_auto"), Array.Empty()); GUILayout.Label(T("label.sniper_tip"), _mutedStyle, Array.Empty()); GUILayout.Space(6f); _customWeapon = GUILayout.Toggle(_customWeapon, T("toggle.custom_weapon"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.delay"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponDelayText = GUILayout.TextField(_weaponDelayText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); GUILayout.Label(T("label.speed_param"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponProjectileSpeedText = GUILayout.TextField(_weaponProjectileSpeedText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); GUILayout.Label(T("label.count"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponProjectileCountText = GUILayout.TextField(_weaponProjectileCountText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); GUILayout.Label(T("label.spread"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponSpreadText = GUILayout.TextField(_weaponSpreadText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); GUILayout.Label(T("label.recoil"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponRecoilText = GUILayout.TextField(_weaponRecoilText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); GUILayout.Label(T("label.damage"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _weaponDamageText = GUILayout.TextField(_weaponDamageText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) })) { ApplyWeaponTextValues(); } GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.fishing")); _fastFishing = GUILayout.Toggle(_fastFishing, T("toggle.fast_fishing"), Array.Empty()); _instantBite = GUILayout.Toggle(_instantBite, T("toggle.instant_bite"), Array.Empty()); _customRod = GUILayout.Toggle(_customRod, T("toggle.custom_rod"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.reel"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _rodReelText = GUILayout.TextField(_rodReelText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); GUILayout.Label(T("label.step"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) }); _rodStepText = GUILayout.TextField(_rodStepText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); GUILayout.Label(T("label.throw"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _rodThrowText = GUILayout.TextField(_rodThrowText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); if (GUILayout.Button(T("btn.apply_rod"), Array.Empty())) { ApplyRodTextValues(); } GUILayout.EndHorizontal(); GUILayout.Space(6f); _forceCatchItem = GUILayout.Toggle(_forceCatchItem, T("toggle.force_catch"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.item_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); _catchItemIdText = GUILayout.TextField(_catchItemIdText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); GUILayout.Label(T("label.weight"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _catchWeightText = GUILayout.TextField(_catchWeightText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); _forceCatchShiny = GUILayout.Toggle(_forceCatchShiny, T("toggle.shiny"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); if (GUILayout.Button(T("btn.apply_catch"), Array.Empty())) { ApplyCatchTextValues(); } GUILayout.EndHorizontal(); EndUiCard(); Item val = ((Object.op_Implicit((Object)(object)player) && Object.op_Implicit((Object)(object)player.Holding)) ? player.Holding.HeldItem : null); BeginUiCard(T("card.equipped"), T("card.equipped_desc") + (Object.op_Implicit((Object)(object)val) ? $"{((Object)val).name} (ID {val.ID})" : T("menu.none"))); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.Weapon)) { GUILayout.Label(T("label.ammo") + val.Weapon.Ammo + T("label.damage_colon") + val.Weapon.Damage, Array.Empty()); } if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.FishingRod)) { GUILayout.Label(T("label.rod_detected"), Array.Empty()); } GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = IsHost && Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.Weapon); if (GUILayout.Button(T("btn.max_attachments"), Array.Empty())) { MaxWeaponAttachments(Object.op_Implicit((Object)(object)val) ? val.Weapon : null); } if (GUILayout.Button(T("btn.max_bullets"), Array.Empty())) { MaxBulletUpgrade(Object.op_Implicit((Object)(object)val) ? val.Weapon : null); } GUI.enabled = IsHost && Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.Melee); if (GUILayout.Button(T("btn.max_melee"), Array.Empty())) { MaxMeleeUpgrade(Object.op_Implicit((Object)(object)val) ? val.Melee : null); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); } private void DrawEspAimAndCrosshair() { BeginUiCard(T("card.esp"), T("card.esp_desc")); _espEnabled = GUILayout.Toggle(_espEnabled, T("toggle.esp"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); _espPlayers = GUILayout.Toggle(_espPlayers, T("toggle.players"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _espAliveCreatures = GUILayout.Toggle(_espAliveCreatures, T("toggle.alive"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _espDeadCreatures = GUILayout.Toggle(_espDeadCreatures, T("toggle.dead"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _espItems = GUILayout.Toggle(_espItems, T("toggle.items"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.Label(T("label.distance"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) }); _espDistanceText = GUILayout.TextField(_espDistanceText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { _espDistance = ParseClamped(_espDistanceText, 250f, 5f, 2000f); _espDistanceText = _espDistance.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.esp_distance") + _espDistanceText); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.box_style"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) }); _espBoxes = GUILayout.Toggle(_espBoxes, T("toggle.boxes"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); _espCornerBoxes = GUILayout.Toggle(_espCornerBoxes, T("toggle.corners"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _espHealthBars = GUILayout.Toggle(_espHealthBars, T("toggle.healthbars"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); _espSnaplines = GUILayout.Toggle(_espSnaplines, T("toggle.snaplines"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); GUILayout.EndHorizontal(); GUILayout.Label(T("label.esp_color_tip"), _mutedStyle, Array.Empty()); EndUiCard(); BeginUiCard(T("card.aim"), T("card.aim_desc")); _strongAim = GUILayout.Toggle(_strongAim, T("toggle.strong_aim"), Array.Empty()); _aimWithoutAds = GUILayout.Toggle(_aimWithoutAds, T("toggle.no_ads"), Array.Empty()); _aimStickyTarget = GUILayout.Toggle(_aimStickyTarget, T("toggle.sticky"), Array.Empty()); _aimPredictMovement = GUILayout.Toggle(_aimPredictMovement, T("toggle.predict"), Array.Empty()); _magicBullet = GUILayout.Toggle(_magicBullet, T("toggle.magic"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.target_type"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) }); _aimTeammates = GUILayout.Toggle(_aimTeammates, T("toggle.players"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); _aimAliveCreatures = GUILayout.Toggle(_aimAliveCreatures, T("toggle.alive"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _aimDeadCreatures = GUILayout.Toggle(_aimDeadCreatures, T("toggle.dead"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _aimItems = GUILayout.Toggle(_aimItems, T("toggle.items"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); _aimIgnoreObstacles = GUILayout.Toggle(_aimIgnoreObstacles, T("toggle.ignore"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.aim_params"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); _aimDistanceText = GUILayout.TextField(_aimDistanceText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _aimAngleText = GUILayout.TextField(_aimAngleText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _aimSpeedText = GUILayout.TextField(_aimSpeedText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); if (GUILayout.Button(T("btn.apply_aim"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) })) { ApplyAimTextValues(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.sharpness"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); _aimSharpnessText = GUILayout.TextField(_aimSharpnessText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _aimPredictionText = GUILayout.TextField(_aimPredictionText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); GUILayout.Label(T("label.magic_tip"), _mutedStyle, Array.Empty()); GUILayout.EndHorizontal(); EndUiCard(); DrawCrosshairSettings(); } private void DrawCrosshairSettings() { //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) BeginUiCard(T("card.crosshair"), T("card.crosshair_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.mode"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _crosshairModeText = GUILayout.TextField(_crosshairModeText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); if (GUILayout.Button("◄", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) })) { CrosshairState.Mode = Mathf.Max(0, CrosshairState.Mode - 1); UpdateCrosshairModeText(); SetStatus(T("status.crosshair_mode") + CrosshairState.ModeNames[CrosshairState.Mode]); } if (GUILayout.Button("►", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) })) { CrosshairState.Mode = Mathf.Min(CrosshairState.ModeNames.Length - 1, CrosshairState.Mode + 1); UpdateCrosshairModeText(); SetStatus(T("status.crosshair_mode") + CrosshairState.ModeNames[CrosshairState.Mode]); } GUILayout.EndHorizontal(); GUILayout.Label(T("label.current") + CrosshairState.ModeNames[CrosshairState.Mode] + " - " + CrosshairState.ModeDescs[CrosshairState.Mode], _mutedStyle, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.style"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); if (GUILayout.Button(T("style.dot"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.Dot; SetStatus(T("status.crosshair_style") + T("style.dot")); } if (GUILayout.Button(T("style.cross"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.Cross; SetStatus(T("status.crosshair_style") + T("style.cross")); } if (GUILayout.Button(T("style.t"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.TShape; SetStatus(T("status.crosshair_style") + T("style.t")); } if (GUILayout.Button(T("style.circle"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.Circle; SetStatus(T("status.crosshair_style") + T("style.circle")); } if (GUILayout.Button(T("style.dot_circle"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.DotWithCircle; SetStatus(T("status.crosshair_style") + T("style.dot_circle")); } if (GUILayout.Button(T("style.crosshair"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Style = CrosshairStyle.Crosshair; SetStatus(T("status.crosshair_style") + T("style.crosshair")); } GUILayout.EndHorizontal(); GUILayout.Label(T("label.current_style") + CrosshairState.StyleNames[(int)CrosshairState.Style], _mutedStyle, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.color"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); if (GUILayout.Button(T("color.white"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.white; SetStatus(T("status.crosshair_color") + T("color.white")); } if (GUILayout.Button(T("color.red"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.red; SetStatus(T("status.crosshair_color") + T("color.red")); } if (GUILayout.Button(T("color.green"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.green; SetStatus(T("status.crosshair_color") + T("color.green")); } if (GUILayout.Button(T("color.blue"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.blue; SetStatus(T("status.crosshair_color") + T("color.blue")); } if (GUILayout.Button(T("color.cyan"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.cyan; SetStatus(T("status.crosshair_color") + T("color.cyan")); } if (GUILayout.Button(T("color.yellow"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { CrosshairState.Color = Color.yellow; SetStatus(T("status.crosshair_color") + T("color.yellow")); } GUILayout.Label(T("label.custom"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); _crosshairColorText = GUILayout.TextField(_crosshairColorText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) })) { ApplyCustomCrosshairColor(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.size"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _crosshairSizeText = GUILayout.TextField(_crosshairSizeText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) })) { float num = (CrosshairState.Size = ParseClamped(_crosshairSizeText, 10f, 2f, 50f)); _crosshairSizeText = num.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.crosshair_size") + _crosshairSizeText); } GUILayout.Label(T("label.thickness"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _crosshairThicknessText = GUILayout.TextField(_crosshairThicknessText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) })) { float num2 = (CrosshairState.Thickness = ParseClamped(_crosshairThicknessText, 2f, 0.5f, 10f)); _crosshairThicknessText = num2.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.crosshair_thickness") + _crosshairThicknessText); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.gap"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _crosshairGapText = GUILayout.TextField(_crosshairGapText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) })) { float num3 = (CrosshairState.Gap = ParseClamped(_crosshairGapText, 4f, 0f, 20f)); _crosshairGapText = num3.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.crosshair_gap") + _crosshairGapText); } GUILayout.Label(T("label.t_length"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); _crosshairTLengthText = GUILayout.TextField(_crosshairTLengthText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) })) { float num4 = (CrosshairState.TLength = ParseClamped(_crosshairTLengthText, 15f, 2f, 50f)); _crosshairTLengthText = num4.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.crosshair_tlength") + _crosshairTLengthText); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); CrosshairState.ShowOutline = GUILayout.Toggle(CrosshairState.ShowOutline, T("toggle.outline"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); CrosshairState.ShowSpreadRing = GUILayout.Toggle(CrosshairState.ShowSpreadRing, T("toggle.spread_ring"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); GUILayout.EndHorizontal(); GUILayout.Label(T("label.current_color") + ((object)Unsafe.As(ref CrosshairState.Color)/*cast due to .constrained prefix*/).ToString(), _mutedStyle, Array.Empty()); EndUiCard(); } private void DrawCasinoAndCommands() { //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Expected O, but got Unknown //IL_0466: Expected O, but got Unknown BeginUiCard(T("card.roulette"), T("card.roulette_desc")); _rouletteAlwaysWin = GUILayout.Toggle(_rouletteAlwaysWin, T("toggle.roulette_win"), Array.Empty()); _customRoulettePayout = GUILayout.Toggle(_customRoulettePayout, T("toggle.roulette_payout"), Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.red_black"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); _rouletteRedBlackText = GUILayout.TextField(_rouletteRedBlackText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUILayout.Label(T("label.green"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _rouletteGreenText = GUILayout.TextField(_rouletteGreenText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); if (GUILayout.Button(T("btn.apply_roulette"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) })) { ApplyRouletteTextValues(); } GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.slots"), T("card.slots_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.item_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); _slotItemIdText = GUILayout.TextField(_slotItemIdText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUILayout.Label(T("label.skin_id"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); _slotSkinText = GUILayout.TextField(_slotSkinText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUI.enabled = IsHost; if (GUILayout.Button(T("btn.set_prize"), Array.Empty())) { SetSlotPrize(); } if (GUILayout.Button(T("btn.random_prize"), Array.Empty())) { SlotMachineManager.SetCheatSkin((Item)null, byte.MaxValue); SetStatus(T("status.random_prize")); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); BeginUiCard(T("card.commands"), T("card.commands_desc")); GUILayout.Label(T("label.commands_list"), _mutedStyle, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); _command = GUILayout.TextField(_command, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUI.enabled = IsHost; if (GUILayout.Button(T("btn.execute"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) })) { SetStatus(DazedCommands.IsServerCommand(_command) ? (T("status.command_submitted") + _command) : (T("status.command_invalid") + _command)); } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.Label(T("label.command_example"), _mutedStyle, Array.Empty()); GUILayout.Space(10f); GUILayout.Label(T("label.commands_help_title"), _sectionTitleStyle, Array.Empty()); GUILayout.Space(4f); string text = T("label.commands_help_detail"); GUIStyle val = new GUIStyle(_mutedStyle) { fontSize = 12, fontStyle = (FontStyle)0, wordWrap = true, richText = false, padding = new RectOffset(8, 8, 8, 8) }; GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); GUILayout.TextArea(text, val, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.Height(360f) }); GUILayout.EndVertical(); EndUiCard(); } private void DrawOtherSettings() { BeginUiCard(T("card.max_players"), T("card.max_players_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.max_players"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); _maxPlayersText = GUILayout.TextField(_maxPlayersText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); GUILayout.Label(string.Format(T("label.current_fmt"), _maxPlayers), _mutedStyle, Array.Empty()); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { ApplyMaxPlayers(); } if (GUILayout.Button("重置", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { _maxPlayersText = "8"; ApplyMaxPlayers(); } GUILayout.EndHorizontal(); GUILayout.Space(4f); GUILayout.Label(T("label.max_players_tip"), _mutedStyle, Array.Empty()); EndUiCard(); BeginUiCard(T("card.lobby"), T("card.lobby_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = IsHost; if (GUILayout.Button(T("btn.public"), Array.Empty())) { SetLobbyPublic(isPublic: true); } if (GUILayout.Button(T("btn.private"), Array.Empty())) { SetLobbyPublic(isPublic: false); } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Label(T("label.lobby_status") + (IsLobbyPublic() ? T("label.public") : T("label.private")), _mutedStyle, Array.Empty()); EndUiCard(); BeginUiCard(T("card.performance"), T("card.performance_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(T("label.fps_limit"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); _fpsLimitText = GUILayout.TextField(_fpsLimitText, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); if (GUILayout.Button(T("btn.apply"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) })) { ApplyFpsLimit(); } if (GUILayout.Button(T("btn.unlimited"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) })) { _fpsLimitText = "0"; ApplyFpsLimit(); } GUILayout.EndHorizontal(); GUILayout.Label(string.Format(T("label.current_fps"), Mathf.RoundToInt(1f / Mathf.Max(Time.unscaledDeltaTime, 0.0001f))), _mutedStyle, Array.Empty()); EndUiCard(); BeginUiCard(T("card.quick"), T("card.quick_desc")); GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = HasServerConnection && Object.op_Implicit((Object)(object)Player.LocalPlayer); if (GUILayout.Button(T("btn.quit"), Array.Empty())) { QuitToMainMenu(); } if (GUILayout.Button(T("btn.reload"), Array.Empty())) { ReloadScene(); } GUI.enabled = true; GUILayout.EndHorizontal(); EndUiCard(); } private void HostAddMoney(Player player, bool add) { if (!IsHost || !Object.op_Implicit((Object)(object)player)) { SetStatus(T("status.host_required")); return; } int num = ParseInt(_moneyText, 99999); if (add) { MoneyManager.AddMoney(num, player); } else { MoneyManager.RemoveMoney(num, player); } SetStatus((add ? T("status.added_money") : T("status.removed_money")) + Math.Abs(num)); } private void HostSetMoney() { if (!IsHost || !Object.op_Implicit((Object)(object)MoneyManager.Instance)) { SetStatus(T("status.host_required")); return; } int value = Math.Max(0, ParseInt(_moneyText, 99999)); MoneyManager.Instance._money.Value = value; SetStatus(T("status.money_set") + value); } private void FillVitals(Player player) { if (IsHost && Object.op_Implicit((Object)(object)player) && Object.op_Implicit((Object)(object)player.Vitals)) { player.Vitals.Heal(1000); player.Vitals.RestoreFullness(1000); player.Vitals._syncedPoison.Value = 0; player.Vitals._syncedFire.Value = 0; SetStatus(T("status.vitals_filled")); } } private void TeleportPlayerNear(Player target, Vector3 position) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (HasServerConnection && Object.op_Implicit((Object)(object)target)) { Server.Instance.TeleportPlayer(target, position, target.Transform.eulerAngles.y); SetStatus(T("status.teleporting") + target.SteamName + T("status.to") + FormatVector(position)); } } private void GiveItemToPlayer(Player target, string idText) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_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) if (HasServerConnection && Object.op_Implicit((Object)(object)target)) { int num = Mathf.Clamp(ParseInt(idText, -1), 0, 254); Item val = null; try { val = GameInfo.IDToItem((byte)num); } catch { } if (!Object.op_Implicit((Object)(object)val)) { SetStatus(T("status.invalid_id") + idText); return; } Item val2 = (Object.op_Implicit((Object)(object)target.Holding) ? target.Holding.HeldItem : null); Server.Instance.BuyItem(val.ID, target, val2, target.Transform.position + Vector3.up * 2f, Quaternion.identity, true); SetStatus(T("status.giving") + target.SteamName + $": ID {val.ID} {((Object)val).name}"); } } private void RevivePlayer(Player target) { if (!HasServerConnection || !Object.op_Implicit((Object)(object)target) || !Object.op_Implicit((Object)(object)target.Dying) || !target.Dying.IsDead || !Object.op_Implicit((Object)(object)target.Dying.DeadPlayer)) { SetStatus(T("status.no_revive_target")); return; } Server.Instance.ResurrectPlayer(target, target.Dying.DeadPlayer); SetStatus(T("status.reviving") + target.SteamName); } private void ReviveAllPlayers() { if (!HasServerConnection) { return; } int num = 0; Player[] array = PlayerManager.Players.ToArray(); foreach (Player val in array) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.Dying) && val.Dying.IsDead && Object.op_Implicit((Object)(object)val.Dying.DeadPlayer)) { Server.Instance.ResurrectPlayer(val, val.Dying.DeadPlayer); num++; } } SetStatus(T("status.revive_all") + num); } private void ClearAbnormalState(Player target) { //IL_008a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) if (IsHost && Object.op_Implicit((Object)(object)target)) { if (Object.op_Implicit((Object)(object)target.Vitals)) { target.Vitals.Heal(1000); target.Vitals.RestoreFullness(1000); target.Vitals._syncedPoison.Value = 0; target.Vitals._syncedFire.Value = 0; } if (Object.op_Implicit((Object)(object)target.Movement)) { target.Movement.SetVel(Vector3.zero); } if (Object.op_Implicit((Object)(object)target.Rigidbody)) { target.Rigidbody.linearVelocity = Vector3.zero; target.Rigidbody.angularVelocity = Vector3.zero; } SetStatus(T("status.cleared") + target.SteamName); } } private void ApplyAimTextValues() { _aimDistance = ParseClamped(_aimDistanceText, 200f, 5f, 2000f); _aimAcquireAngle = ParseClamped(_aimAngleText, 60f, 1f, 180f); _aimRotationSpeed = ParseClamped(_aimSpeedText, 1440f, 1f, 10000f); _aimTrackingSharpness = ParseClamped(_aimSharpnessText, 80f, 1f, 500f); _aimPredictionFactor = ParseClamped(_aimPredictionText, 1f, 0f, 3f); _aimDistanceText = _aimDistance.ToString("0.##", CultureInfo.InvariantCulture); _aimAngleText = _aimAcquireAngle.ToString("0.##", CultureInfo.InvariantCulture); _aimSpeedText = _aimRotationSpeed.ToString("0.##", CultureInfo.InvariantCulture); _aimSharpnessText = _aimTrackingSharpness.ToString("0.##", CultureInfo.InvariantCulture); _aimPredictionText = _aimPredictionFactor.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.aim_applied")); } private void ApplyWeaponTextValues() { _weaponDelayMultiplier = ParseClamped(_weaponDelayText, 1f, 0.01f, 20f); _weaponProjectileSpeedMultiplier = ParseClamped(_weaponProjectileSpeedText, 1f, 0.05f, 100f); _weaponProjectileCount = Mathf.Clamp(ParseInt(_weaponProjectileCountText, 1), 1, 100); _weaponSpreadMultiplier = ParseClamped(_weaponSpreadText, 1f, 0f, 20f); _weaponRecoilMultiplier = ParseClamped(_weaponRecoilText, 1f, 0f, 20f); _weaponDamageMultiplier = ParseClamped(_weaponDamageText, 1f, 0.1f, 1000f); _weaponDelayText = _weaponDelayMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _weaponProjectileSpeedText = _weaponProjectileSpeedMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _weaponProjectileCountText = _weaponProjectileCount.ToString(CultureInfo.InvariantCulture); _weaponSpreadText = _weaponSpreadMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _weaponRecoilText = _weaponRecoilMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _weaponDamageText = _weaponDamageMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.weapon_applied")); } private void ApplyRodTextValues() { _rodReelMultiplier = ParseClamped(_rodReelText, 1f, 0.05f, 100f); _rodStepMultiplier = ParseClamped(_rodStepText, 1f, 0.05f, 100f); _rodThrowMultiplier = ParseClamped(_rodThrowText, 1f, 0.05f, 100f); _rodReelText = _rodReelMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _rodStepText = _rodStepMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _rodThrowText = _rodThrowMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.rod_applied")); } private void ApplyCatchTextValues() { int num = Mathf.Clamp(ParseInt(_catchItemIdText, 0), 0, 254); _catchItemIdText = num.ToString(CultureInfo.InvariantCulture); _catchWeight = ParseClamped(_catchWeightText, 1f, 0.01f, 1000f); _catchWeightText = _catchWeight.ToString("0.##", CultureInfo.InvariantCulture); Item val = null; try { val = GameInfo.IDToItem((byte)num); } catch { } SetStatus(Object.op_Implicit((Object)(object)val) ? (T("status.catch_set") + $"ID {num} {((Object)val).name}") : (T("status.invalid_id") + num)); } private void ApplyRouletteTextValues() { _rouletteRedBlackMultiplier = ParseClamped(_rouletteRedBlackText, 2f, 0f, 10000f); _rouletteGreenMultiplier = ParseClamped(_rouletteGreenText, 35f, 0f, 10000f); _rouletteRedBlackText = _rouletteRedBlackMultiplier.ToString("0.##", CultureInfo.InvariantCulture); _rouletteGreenText = _rouletteGreenMultiplier.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.roulette_applied")); } private void SetSlotPrize() { int num = Mathf.Clamp(ParseInt(_slotItemIdText, -1), 0, 254); int num2 = Mathf.Clamp(ParseInt(_slotSkinText, -1), 0, 254); Item val = null; try { val = GameInfo.IDToItem((byte)num); } catch { } if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val.SkinPreset) || num2 >= val.SkinPreset.Skins.Count) { SetStatus(T("status.invalid_skin")); return; } SlotMachineManager.SetCheatSkin(val, (byte)num2); SetStatus(T("status.slot_prize") + $"ID {num} {((Object)val).name}, 皮肤 {num2}"); } private void RefreshItems(bool forced) { if (!forced && Time.unscaledTime < _nextItemRefresh && _items.Count > 0) { return; } _nextItemRefresh = Time.unscaledTime + 5f; Dictionary dictionary = new Dictionary(); for (int i = 0; i < 255; i++) { Item val = null; try { val = GameInfo.IDToItem((byte)i); } catch { } if (Object.op_Implicit((Object)(object)val)) { dictionary[(byte)i] = val; } } _items = (from kv in dictionary orderby kv.Key select kv.Value).ToList(); if (forced) { SetStatus(T("status.items_refreshed") + _items.Count); } } private List BuildSkinEntries() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) RefreshItems(forced: false); List list = new List(); foreach (Item item in _items) { if (Object.op_Implicit((Object)(object)item) && Object.op_Implicit((Object)(object)item.SkinPreset)) { IReadOnlyList skins = item.SkinPreset.Skins; for (int i = 0; i < skins.Count && i < 255; i++) { ItemSkin val = skins[i]; list.Add(new SkinEntry { ItemId = item.ID, SkinId = (byte)i, Display = $"物品 {item.ID:000} | 皮肤 {i:000} | {((Object)item).name} | {((ItemSkin)(ref val)).Name} | {((ItemSkin)(ref val)).Rarity}" }); } } } Boat boat = BoatManager.Boat; if (Object.op_Implicit((Object)(object)boat) && Object.op_Implicit((Object)(object)boat.SkinPreset)) { IReadOnlyList skins2 = boat.SkinPreset.Skins; for (int j = 0; j < skins2.Count && j < 255; j++) { ItemSkin val2 = skins2[j]; list.Add(new SkinEntry { ItemId = byte.MaxValue, SkinId = (byte)j, Display = $"物品 255 | 皮肤 {j:000} | 船 | {((ItemSkin)(ref val2)).Name} | {((ItemSkin)(ref val2)).Rarity}" }); } } return list; } private void UnlockSelectedSkin() { int itemId = Mathf.Clamp(ParseInt(_skinItemIdText, -1), 0, 255); int skinId = Mathf.Clamp(ParseInt(_skinIndexText, -1), 0, 254); SkinEntry skinEntry = BuildSkinEntries().FirstOrDefault((SkinEntry v) => v.ItemId == itemId && v.SkinId == skinId); if (string.IsNullOrEmpty(skinEntry.Display)) { SetStatus(T("status.skin_not_found")); } else { UnlockSkin((byte)itemId, (byte)skinId, skinEntry.Display); } } private void UnlockSkin(byte itemId, byte skinId, string display) { SaveManager.UnlockSkin(itemId, skinId); SaveManager.SaveLocal(); SetStatus(T("status.skin_unlocked") + display); } private void UnlockAllItemSkins() { List list = BuildSkinEntries(); foreach (SkinEntry item in list) { SaveManager.UnlockSkin(item.ItemId, item.SkinId); } SaveManager.SaveLocal(); SetStatus(T("status.all_skins_unlocked") + list.Count); } private void UnlockAllCharacterClothes() { SkinManager.UnlockLighthouseKeeper(); SkinManager.UnlockSwampMan(); SkinManager.UnlockSwampLady(); SkinManager.UnlockKioskLady(); SkinManager.UnlockTourist(); SkinManager.UnlockGrillmaster(); SkinManager.UnlockAndrei(); SkinManager.UnlockJacob(); SkinManager.UnlockGunStoreClerc(); SkinManager.UnlockScaredGuyInShorts(); SkinManager.UnlockStoreGradma(); SkinManager.UnlockMilitary(); SkinManager.UnlockScientist(); SkinManager.UnlockBean(); SetStatus(T("status.clothes_unlocked")); } private void SpawnHeld(Item item, Player player) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!HasServerConnection || !Object.op_Implicit((Object)(object)item) || !Object.op_Implicit((Object)(object)player)) { SetStatus(T("status.server_required")); return; } Item val = (Object.op_Implicit((Object)(object)player.Holding) ? player.Holding.HeldItem : null); Transform val2 = (Object.op_Implicit((Object)(object)player.CurCam) ? ((Component)player.CurCam).transform : player.Transform); Vector3 val3 = val2.position + val2.forward * 2f; Server.Instance.BuyItem(item.ID, player, val, val3, Quaternion.identity, true); SetStatus(T("status.spawning") + $"ID {item.ID} {((Object)item).name}"); } private void UnlockAllBaits(Player player) { if (HasServerConnection && Object.op_Implicit((Object)(object)player)) { int num = Math.Min(255, GameInfo.AllBaits.Count); for (int i = 1; i < num; i++) { Server.Instance.BuyBait(player, (byte)i, 0); } SetStatus(T("status.baits_unlocked") + Math.Max(0, num - 1)); } } private void UnlockAllPockets(Player player) { if (IsHost && Object.op_Implicit((Object)(object)player)) { player.Inventory.UnlockExtraPocket((byte)5); SetStatus(T("status.pockets_unlocked")); } } private void SetHeldWeight(Item held) { if (IsHost && Object.op_Implicit((Object)(object)held)) { float value = ParseClamped(_itemWeightText, 1f, 0.01f, 1000f); held._syncedRandomWeight.Value = value; _itemWeightText = value.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.weight_set") + _itemWeightText); } } private void SetHeldCookness(Item held, float target) { if (IsHost && Object.op_Implicit((Object)(object)held)) { held.CookItem(target - held.Cookness); SetStatus(T("status.cookness_set") + target.ToString("0.##", CultureInfo.InvariantCulture)); } } private void NextHeldSkin(Item held) { if (!HasServerConnection || !Object.op_Implicit((Object)(object)held) || !Object.op_Implicit((Object)(object)held.SkinPreset) || held.SkinPreset.Skins.Count == 0) { SetStatus(T("status.no_skin")); return; } byte b = (byte)((held.CurSkin + 1) % held.SkinPreset.Skins.Count); Server.Instance.SetItemSkin(held, b); SetStatus(T("status.skin_switched") + b); } private void SetHeldKillMultiplier(Item held) { if (HasServerConnection && Object.op_Implicit((Object)(object)held)) { float num = ParseClamped(_itemMultiplierText, 5f, 0f, 1000f); if (IsHost) { held._killScoreMultiplier.Value = num; } else { Server.Instance.SetItemMultiplier(held, num); } _itemMultiplierText = num.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.kill_mult_set") + _itemMultiplierText); } } private void SetHeldBetMultiplier(Item held) { if (IsHost && Object.op_Implicit((Object)(object)held)) { float value = ParseClamped(_betMultiplierText, 5f, 0f, 1000f); held._bettingMultiplier.Value = value; _betMultiplierText = value.ToString("0.##", CultureInfo.InvariantCulture); SetStatus(T("status.bet_mult_set") + _betMultiplierText); } } private void MaxWeaponAttachments(Weapon weapon) { if (!IsHost || !Object.op_Implicit((Object)(object)weapon)) { return; } int num = 0; foreach (AttachmentInfo allAttachment in GameInfo.AllAttachments) { if (Object.op_Implicit((Object)(object)allAttachment) && weapon.Attachments.CanAttach(allAttachment) && !weapon.Attachments.HasAttachment(allAttachment)) { weapon.Attachments.SetAttachment(allAttachment); num++; } } SetStatus(T("status.attachments_applied") + num); } private void MaxBulletUpgrade(Weapon weapon) { if (IsHost && Object.op_Implicit((Object)(object)weapon)) { int num = 0; while (weapon.Attachments.GetNextBulletUpgrade(byte.MaxValue) != null && num < 64) { weapon.Attachments.UpgradeBullets(); num++; } SetStatus(T("status.bullet_upgraded") + num); } } private void MaxMeleeUpgrade(Melee melee) { if (IsHost && Object.op_Implicit((Object)(object)melee)) { int num = 0; while (melee.GetNextSharpnessUpgrade(byte.MaxValue) != null && num < 64) { melee.UpgradeSharpness(); num++; } SetStatus(T("status.melee_upgraded") + num); } } private void TeleportToFields(Player player) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) float num = ParseFloat(_teleportX, player.Transform.position.x); float num2 = ParseFloat(_teleportY, player.Transform.position.y); float num3 = ParseFloat(_teleportZ, player.Transform.position.z); Teleport(player, new Vector3(num, num2, num3)); } private void Teleport(Player player, Vector3 pos) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (!HasServerConnection || !Object.op_Implicit((Object)(object)player)) { SetStatus(T("status.server_required")); return; } Server.Instance.TeleportPlayer(player, pos, player.Transform.eulerAngles.y); SetStatus(T("status.teleporting_to") + FormatVector(pos)); } private void UnlockBoat() { if (!IsHost || !Object.op_Implicit((Object)(object)BoatManager.Boat)) { SetStatus(T("status.boat_required")); return; } Boat boat = BoatManager.Boat; boat.UnlockBoat(); boat.UnlockBoatRadar(); try { object obj = BoatMotorsField?.GetValue(boat); PropertyInfo propertyInfo = obj?.GetType().GetProperty("Count"); int num = ((!(propertyInfo == null)) ? ((int)propertyInfo.GetValue(obj, null)) : 0); if (num > 0) { boat.SetMotor((byte)(num - 1)); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); } SetStatus(T("status.boat_unlocked")); } private void ApplyMaxPlayers() { int num = ParseInt(_maxPlayersText, 8); num = Mathf.Clamp(num, 1, 250); _maxPlayersText = num.ToString(); _maxPlayers = num; SetStatus(T("status.max_players_set") + num); try { ConnectionManager instance = ConnectionManager.Instance; if ((Object)(object)instance != (Object)null) { AccessTools.Field(typeof(ConnectionManager), "_maxPlayers")?.SetValue(instance, num); } } catch { } } private void SetLobbyPublic(bool isPublic) { if (!IsHost) { SetStatus(T("status.host_required")); return; } try { if (SaveManager.CurServerSave != null) { SaveManager.CurServerSave.IsPublic = isPublic; SetStatus(T("status.lobby_set") + (isPublic ? T("label.public") : T("label.private"))); } else { SetStatus(T("status.no_lobby")); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); SetStatus(T("status.error") + ex.Message); } } private bool IsLobbyPublic() { try { return SaveManager.CurServerSave != null && SaveManager.CurServerSave.IsPublic; } catch { return false; } } private void ApplyFpsLimit() { int num = ParseInt(_fpsLimitText, 60); num = Mathf.Max(0, num); _fpsLimitText = num.ToString(); if (num > 0) { Application.targetFrameRate = num; SetStatus(T("status.fps_limit") + num + " FPS"); } else { Application.targetFrameRate = -1; SetStatus(T("status.fps_unlimited")); } } private void QuitToMainMenu() { try { try { SceneManager.LoadScene("MainMenu"); SetStatus(T("status.loading_main")); } catch { SceneManager.LoadScene(0); SetStatus(T("status.loading_main")); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); SetStatus(T("status.error") + ex.Message); } } private void ReloadScene() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) try { Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; SceneManager.LoadScene(name); SetStatus(T("status.reloading") + name); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); SetStatus(T("status.error") + ex.Message); } } private void SetStatus(string value) { _status = DateTime.Now.ToString("HH:mm:ss") + " " + value; ((BaseUnityPlugin)this).Logger.LogInfo((object)value); } private void InitializeCrosshair() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown try { GameObject val = new GameObject("TrainerCrosshairOverlay"); ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); val.AddComponent(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"准星系统已初始化"); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("准星系统初始化失败: " + ex.Message)); } } private void UpdateCrosshairModeText() { _crosshairModeText = CrosshairState.ModeNames[CrosshairState.Mode]; } private void ApplyCustomCrosshairColor() { //IL_0098: 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) try { string text = _crosshairColorText.TrimStart('#'); if (text.Length >= 6) { int num = Convert.ToInt32(text.Substring(0, 2), 16); int num2 = Convert.ToInt32(text.Substring(2, 2), 16); int num3 = Convert.ToInt32(text.Substring(4, 2), 16); float num4 = ((text.Length >= 8) ? ((float)Convert.ToInt32(text.Substring(6, 2), 16) / 255f) : 1f); CrosshairState.Color = new Color((float)num / 255f, (float)num2 / 255f, (float)num3 / 255f, num4); SetStatus(T("status.color_applied") + "#" + text); } else { SetStatus(T("status.invalid_color")); } } catch { SetStatus(T("status.invalid_color")); } } private static int ParseInt(string text, int fallback) { int result; return int.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out result) ? result : fallback; } private static float ParseFloat(string text, float fallback) { float result; return float.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out result) ? result : fallback; } private static float ParseClamped(string text, float fallback, float min, float max) { return Mathf.Clamp(ParseFloat(text, fallback), min, max); } private static string FormatVector(Vector3 value) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) return $"({value.x:0.00}, {value.y:0.00}, {value.z:0.00})"; } private static float GetFloat(FieldInfo field, object instance, float fallback) { try { return (field == null) ? fallback : ((float)field.GetValue(instance)); } catch { return fallback; } } private static int GetInt(FieldInfo field, object instance, int fallback) { try { return (field == null) ? fallback : ((int)field.GetValue(instance)); } catch { return fallback; } } private static bool GetBool(FieldInfo field, object instance, bool fallback) { try { return (field == null) ? fallback : ((bool)field.GetValue(instance)); } catch { return fallback; } } private static void SetFloat(FieldInfo field, object instance, float value) { if (field != null && instance != null) { field.SetValue(instance, value); } } private static void SetInt(FieldInfo field, object instance, int value) { if (field != null && instance != null) { field.SetValue(instance, value); } } private static void SetBool(FieldInfo field, object instance, bool value) { if (field != null && instance != null) { field.SetValue(instance, value); } } private void DrawEsp() { //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) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.LocalPlayer; if (!Object.op_Implicit((Object)(object)localPlayer) || !Object.op_Implicit((Object)(object)localPlayer.CurCam)) { return; } EnsureEspResources(); GUI.depth = -900; Camera curCam = localPlayer.CurCam; Vector3 position = localPlayer.Transform.position; HashSet hashSet = CollectHeldItems(localPlayer); if (_espPlayers) { foreach (Player otherPlayer in PlayerManager.OtherPlayers) { if (!Object.op_Implicit((Object)(object)otherPlayer) || ((NetworkBehaviour)otherPlayer).IsDeinitializing) { continue; } float num = Vector3.Distance(position, otherPlayer.Transform.position); if (num <= _espDistance) { Vector3 val = ((Object.op_Implicit((Object)(object)otherPlayer.Other) && Object.op_Implicit((Object)(object)otherPlayer.Other.Transform)) ? otherPlayer.Other.Transform.position : otherPlayer.Transform.position); Vector3 head = ((Object.op_Implicit((Object)(object)otherPlayer.Other) && Object.op_Implicit((Object)(object)otherPlayer.Other.CamProxy)) ? (otherPlayer.Other.CamProxy.position + Vector3.up * 0.15f) : (val + Vector3.up * 1.9f)); if (TryGetVerticalScreenRect(curCam, val, head, 0.48f, out var rect)) { string arg = (Object.op_Implicit((Object)(object)otherPlayer.Vitals) ? (" | HP " + otherPlayer.Vitals.Health) : ""); float? health = (Object.op_Implicit((Object)(object)otherPlayer.Vitals) ? new float?(Mathf.Clamp01((float)otherPlayer.Vitals.Health / 100f)) : ((float?)null)); DrawEspEntity(rect, $"{otherPlayer.SteamName} | {num:0}m{arg}", Color.cyan, health); } } } } if (!_espAliveCreatures && !_espDeadCreatures && !_espItems) { return; } foreach (Item item in ItemManager.Items.Values.Distinct()) { if (!Object.op_Implicit((Object)(object)item) || ((NetworkBehaviour)item).IsDeinitializing || hashSet.Contains(item)) { continue; } float num2 = Vector3.Distance(position, ((Component)item).transform.position); if (!(num2 <= _espDistance)) { continue; } Creature creature = item.Creature; Rect rect3; if (Object.op_Implicit((Object)(object)creature)) { bool isDead = creature.IsDead; if ((!isDead || _espDeadCreatures) && (isDead || _espAliveCreatures)) { string text = $"{((Object)item).name} | {num2:0}m | HP {creature.Hp}/{creature.MaxHp} | {item.RandomizedWeight:0.##}x"; if (TryGetRendererScreenRect(curCam, ((Component)item).gameObject, out var rect2) || TryGetVerticalScreenRect(curCam, ((Component)item).transform.position, ((Component)item).transform.position + Vector3.up * Mathf.Max(1f, creature.HeadPos), 0.65f, out rect2)) { float value = ((creature.MaxHp <= 0) ? 0f : Mathf.Clamp01((float)creature.Hp / (float)creature.MaxHp)); DrawEspEntity(rect2, text, isDead ? Color.red : Color.green, value); } } } else if (_espItems && (TryGetRendererScreenRect(curCam, ((Component)item).gameObject, out rect3) || TryGetVerticalScreenRect(curCam, ((Component)item).transform.position, ((Component)item).transform.position + Vector3.up * 0.5f, 0.8f, out rect3))) { DrawEspEntity(rect3, $"{((Object)item).name} | {num2:0}m | {item.RandomizedWeight:0.##}x", Color.yellow, null); } } } private HashSet CollectHeldItems(Player local) { HashSet hashSet = new HashSet(); AddHeldItem(local, hashSet); foreach (Player otherPlayer in PlayerManager.OtherPlayers) { AddHeldItem(otherPlayer, hashSet); } return hashSet; } private void AddHeldItem(Player player, HashSet heldItems) { if (Object.op_Implicit((Object)(object)player) && !((NetworkBehaviour)player).IsDeinitializing && Object.op_Implicit((Object)(object)player.Holding)) { Item heldItem = player.Holding.HeldItem; if (Object.op_Implicit((Object)(object)heldItem)) { heldItems.Add(heldItem); } } } private void EnsureEspResources() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (_espStyle == null) { _espStyle = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 13, fontStyle = (FontStyle)1 }; } if (!Object.op_Implicit((Object)(object)_espTexture)) { _espTexture = new Texture2D(1, 1, (TextureFormat)5, false); _espTexture.SetPixel(0, 0, Color.white); _espTexture.Apply(); ((Object)_espTexture).hideFlags = (HideFlags)61; } } private void DrawEspEntity(Rect box, string text, Color color, float? health) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) if (((Rect)(ref box)).width < 2f || ((Rect)(ref box)).height < 2f) { return; } if (_espSnaplines) { Vector2 start = default(Vector2); ((Vector2)(ref start))..ctor((float)Screen.width * 0.5f, (float)Screen.height - 2f); Vector2 end = default(Vector2); ((Vector2)(ref end))..ctor(((Rect)(ref box)).center.x, ((Rect)(ref box)).yMax); DrawEspLine(start, end, Color.black, 3f); DrawEspLine(start, end, color, 1f); } if (_espBoxes) { if (_espCornerBoxes) { DrawCornerBox(box, Color.black, 3f); DrawCornerBox(box, color, 1f); } else { DrawFullBox(box, Color.black, 3f); DrawFullBox(box, color, 1f); } } if (_espHealthBars && health.HasValue) { DrawHealthBar(box, health.Value); } float num = Mathf.Max(260f, ((Rect)(ref box)).width + 120f); _espStyle.normal.textColor = color; GUI.Label(new Rect(((Rect)(ref box)).center.x - num * 0.5f, ((Rect)(ref box)).yMin - 23f, num, 22f), text, _espStyle); } private void DrawFullBox(Rect rect, Color color, float thickness) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_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) DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMin, ((Rect)(ref rect)).width, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMax - thickness, ((Rect)(ref rect)).width, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMin, thickness, ((Rect)(ref rect)).height), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMax - thickness, ((Rect)(ref rect)).yMin, thickness, ((Rect)(ref rect)).height), color); } private void DrawCornerBox(Rect rect, Color color, float thickness) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(6f, ((Rect)(ref rect)).width * 0.28f); float num2 = Mathf.Max(6f, ((Rect)(ref rect)).height * 0.22f); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMin, num, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMax - num, ((Rect)(ref rect)).yMin, num, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMax - thickness, num, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMax - num, ((Rect)(ref rect)).yMax - thickness, num, thickness), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMin, thickness, num2), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMax - thickness, ((Rect)(ref rect)).yMin, thickness, num2), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMin, ((Rect)(ref rect)).yMax - num2, thickness, num2), color); DrawSolidRect(new Rect(((Rect)(ref rect)).xMax - thickness, ((Rect)(ref rect)).yMax - num2, thickness, num2), color); } private void DrawHealthBar(Rect box, float value) { //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) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) value = Mathf.Clamp01(value); Rect rect = default(Rect); ((Rect)(ref rect))..ctor(((Rect)(ref box)).xMin - 8f, ((Rect)(ref box)).yMin - 1f, 5f, ((Rect)(ref box)).height + 2f); DrawSolidRect(rect, Color.black); float num = Mathf.Max(0f, (((Rect)(ref rect)).height - 2f) * value); Color color = Color.Lerp(Color.red, Color.green, value); DrawSolidRect(new Rect(((Rect)(ref rect)).x + 1f, ((Rect)(ref rect)).yMax - 1f - num, ((Rect)(ref rect)).width - 2f, num), color); } private void DrawEspLine(Vector2 start, Vector2 end, Color color, float thickness) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) Vector2 val = end - start; float magnitude = ((Vector2)(ref val)).magnitude; if (!(magnitude <= Mathf.Epsilon)) { Matrix4x4 matrix = GUI.matrix; GUIUtility.RotateAroundPivot(Mathf.Atan2(val.y, val.x) * 57.29578f, start); DrawSolidRect(new Rect(start.x, start.y - thickness * 0.5f, magnitude, thickness), color); GUI.matrix = matrix; } } private void DrawSolidRect(Rect rect, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Color color2 = GUI.color; GUI.color = color; GUI.DrawTexture(rect, (Texture)(object)_espTexture); GUI.color = color2; } private static bool TryGetVerticalScreenRect(Camera cam, Vector3 feet, Vector3 head, float widthRatio, out Rect rect) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0097: 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_00c3: Unknown result type (might be due to invalid IL or missing references) rect = default(Rect); Vector3 val = cam.WorldToScreenPoint(feet); Vector3 val2 = cam.WorldToScreenPoint(head); if (val.z <= 0f || val2.z <= 0f) { return false; } float num = (float)Screen.height - val.y; float num2 = (float)Screen.height - val2.y; float num3 = Mathf.Abs(num - num2); if (num3 < 4f) { return false; } float num4 = Mathf.Max(8f, num3 * widthRatio); float num5 = (val.x + val2.x) * 0.5f; rect = new Rect(num5 - num4 * 0.5f, Mathf.Min(num, num2), num4, num3); return true; } private static bool TryGetRendererScreenRect(Camera cam, GameObject root, out Rect rect) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_00b4: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) rect = default(Rect); if (!Object.op_Implicit((Object)(object)root)) { return false; } Renderer[] componentsInChildren = root.GetComponentsInChildren(); bool flag = false; Bounds val = default(Bounds); Renderer[] array = componentsInChildren; foreach (Renderer val2 in array) { if (!Object.op_Implicit((Object)(object)val2) || !val2.enabled) { continue; } string name = ((object)val2).GetType().Name; if (name.IndexOf("Particle", 5) >= 0 || name.IndexOf("Trail", 5) >= 0 || name.IndexOf("Line", 5) >= 0) { continue; } Bounds bounds = val2.bounds; Vector3 val3 = ((Bounds)(ref bounds)).size; if (!(((Vector3)(ref val3)).sqrMagnitude > Mathf.Epsilon)) { continue; } val3 = ((Bounds)(ref bounds)).extents; if (((Vector3)(ref val3)).magnitude <= 50f) { if (!flag) { val = bounds; flag = true; } else { ((Bounds)(ref val)).Encapsulate(bounds); } } } if (!flag || cam.WorldToScreenPoint(((Bounds)(ref val)).center).z <= 0f) { return false; } Vector3 center = ((Bounds)(ref val)).center; Vector3 extents = ((Bounds)(ref val)).extents; float num = float.MaxValue; float num2 = float.MaxValue; float num3 = float.MinValue; float num4 = float.MinValue; for (int j = -1; j <= 1; j += 2) { for (int k = -1; k <= 1; k += 2) { for (int l = -1; l <= 1; l += 2) { Vector3 val4 = cam.WorldToScreenPoint(center + Vector3.Scale(extents, new Vector3((float)j, (float)k, (float)l))); if (val4.z > 0f) { float num5 = (float)Screen.height - val4.y; num = Mathf.Min(num, val4.x); num3 = Mathf.Max(num3, val4.x); num2 = Mathf.Min(num2, num5); num4 = Mathf.Max(num4, num5); } } } } if (num == float.MaxValue || num3 - num < 2f || num4 - num2 < 2f) { return false; } rect = Rect.MinMaxRect(num - 2f, num2 - 2f, num3 + 2f, num4 + 2f); return ((Rect)(ref rect)).width <= (float)Screen.width * 2f && ((Rect)(ref rect)).height <= (float)Screen.height * 2f; } internal bool TryGetAimRotationDelta(Vector3 cameraPosition, Vector3 cameraEuler, float manualLookAmount, out Vector2 delta) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) delta = Vector2.zero; if (!_strongAim) { _lockedAimTarget = null; return false; } Player localPlayer = Player.LocalPlayer; if (!Object.op_Implicit((Object)(object)localPlayer) || !Object.op_Implicit((Object)(object)localPlayer.Holding)) { _lockedAimTarget = null; return true; } Item heldItem = localPlayer.Holding.HeldItem; if (!Object.op_Implicit((Object)(object)heldItem) || !Object.op_Implicit((Object)(object)heldItem.Weapon) || _menuVisible || localPlayer.BlockInputs) { _lockedAimTarget = null; return true; } if (!_aimWithoutAds && !heldItem.Weapon.IsAds) { _lockedAimTarget = null; return true; } Vector3 forward = Quaternion.Euler(cameraEuler) * Vector3.forward; CollectAimCandidates(localPlayer, heldItem); if (!_aimStickyTarget) { _lockedAimTarget = null; } if (!TrySelectAimCandidate(cameraPosition, forward, requireAcquireAngle: true, _aimStickyTarget, out var selected)) { return true; } float num = Mathf.Max(1f, GetFloat(WeaponProjectileSpeedField, heldItem.Weapon, 100f)); object? obj = WeaponInfoField?.GetValue(heldItem.Weapon); WeaponInfo val = (WeaponInfo)((obj is WeaponInfo) ? obj : null); bool flag = IsHitScan(val); Vector3 val2 = GetPredictedTargetPosition(selected, cameraPosition, GetPlayerVelocity(localPlayer), num, flag); if (!flag && val != null && val.ProjectileGravity > 0f) { float num2 = Mathf.Clamp(Vector3.Distance(cameraPosition, val2) / num, 0f, 3f); val2 += Vector3.up * (0.5f * val.ProjectileGravity * num2 * num2); } Quaternion val3 = Quaternion.LookRotation(val2 - cameraPosition, Vector3.up); Vector3 eulerAngles = ((Quaternion)(ref val3)).eulerAngles; Vector2 val4 = default(Vector2); ((Vector2)(ref val4))..ctor(Mathf.DeltaAngle(cameraEuler.x, eulerAngles.x), Mathf.DeltaAngle(cameraEuler.y, eulerAngles.y)); float num3 = Mathf.Lerp(1f, 0.65f, Mathf.Clamp01(manualLookAmount)); float num4 = 1f - Mathf.Exp((0f - _aimTrackingSharpness) * Time.deltaTime); delta = Vector2.ClampMagnitude(val4 * (num4 * num3), _aimRotationSpeed * Time.deltaTime); float num5 = _aimRotationSpeed * Time.deltaTime * 0.5f; delta = Vector2.ClampMagnitude(delta, num5); return true; } private void CollectAimCandidates(Player local, Item held) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) _aimCandidates.Clear(); if (_aimTeammates) { foreach (Player otherPlayer in PlayerManager.OtherPlayers) { if (Object.op_Implicit((Object)(object)otherPlayer) && !((NetworkBehaviour)otherPlayer).IsDeinitializing && Object.op_Implicit((Object)(object)otherPlayer.Transform) && (!Object.op_Implicit((Object)(object)otherPlayer.Dying) || !otherPlayer.Dying.IsDead)) { Vector3 position = ((Object.op_Implicit((Object)(object)otherPlayer.Other) && Object.op_Implicit((Object)(object)otherPlayer.Other.CamProxy)) ? otherPlayer.Other.CamProxy.position : (otherPlayer.Transform.position + Vector3.up * 1.6f)); Vector3 velocity = (Object.op_Implicit((Object)(object)otherPlayer.Other) ? otherPlayer.Other.Velocity : GetPlayerVelocity(otherPlayer)); _aimCandidates.Add(new AimCandidate { Target = otherPlayer.Transform, Position = position, Velocity = velocity }); } } } if (!_aimAliveCreatures && !_aimDeadCreatures && !_aimItems) { return; } foreach (Item item in ItemManager.Items.Values.Distinct()) { if (!Object.op_Implicit((Object)(object)item) || ((NetworkBehaviour)item).IsDeinitializing || (Object)(object)item == (Object)(object)held || !Object.op_Implicit((Object)(object)((Component)item).transform)) { continue; } Creature creature = item.Creature; if (Object.op_Implicit((Object)(object)creature)) { if ((!creature.IsDead || _aimDeadCreatures) && (creature.IsDead || _aimAliveCreatures)) { Vector3 position2 = (Object.op_Implicit((Object)(object)((Item)creature).Rig) ? ((Item)creature).Rig.worldCenterOfMass : (((Component)creature).transform.position + Vector3.up * Mathf.Max(0.5f, creature.HeadPos))); Vector3 velocity2 = (Object.op_Implicit((Object)(object)((Item)creature).Rig) ? ((Item)creature).Rig.linearVelocity : Vector3.zero); _aimCandidates.Add(new AimCandidate { Target = ((Component)item).transform, Position = position2, Velocity = velocity2 }); } } else if (_aimItems && !Object.op_Implicit((Object)(object)item.Holder)) { Vector3 position3 = (Object.op_Implicit((Object)(object)item.Rig) ? item.Rig.worldCenterOfMass : ((Component)item).transform.position); Vector3 velocity3 = (Object.op_Implicit((Object)(object)item.Rig) ? item.Rig.linearVelocity : Vector3.zero); _aimCandidates.Add(new AimCandidate { Target = ((Component)item).transform, Position = position3, Velocity = velocity3 }); } } } private bool TrySelectAimCandidate(Vector3 origin, Vector3 forward, bool requireAcquireAngle, bool allowSticky, out AimCandidate selected) { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) selected = default(AimCandidate); float num = Mathf.Max(_aimDistance * _aimDistance, 1f); float num2 = (requireAcquireAngle ? Mathf.Cos(_aimAcquireAngle * (MathF.PI / 180f)) : (-1f)); if (allowSticky && Object.op_Implicit((Object)(object)_lockedAimTarget)) { float minAlignment = Mathf.Cos(Mathf.Clamp(Mathf.Max(_aimAcquireAngle * 1.75f, 100f), 1f, 179f) * (MathF.PI / 180f)); foreach (AimCandidate aimCandidate in _aimCandidates) { if ((Object)(object)aimCandidate.Target == (Object)(object)_lockedAimTarget && IsAimCandidateValid(aimCandidate, origin, forward, num, minAlignment)) { selected = aimCandidate; return true; } } _lockedAimTarget = null; } bool flag = false; float num3 = float.MaxValue; foreach (AimCandidate aimCandidate2 in _aimCandidates) { Vector3 val = aimCandidate2.Position - origin; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (!(sqrMagnitude > Mathf.Epsilon) || !(sqrMagnitude <= num)) { continue; } float num4 = Vector3.Dot(forward, val) / Mathf.Sqrt(sqrMagnitude); if (num4 >= num2 && !IsAimCandidateObstructed(origin, aimCandidate2.Position)) { float num5 = (1f - num4) * 1000f + sqrMagnitude / num; if (num5 < num3) { flag = true; num3 = num5; selected = aimCandidate2; } } } if (flag && allowSticky) { _lockedAimTarget = selected.Target; } return flag; } private bool IsAimCandidateValid(AimCandidate candidate, Vector3 origin, Vector3 forward, float maxDistanceSqr, float minAlignment) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)candidate.Target)) { return false; } Vector3 val = candidate.Position - origin; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; return sqrMagnitude > Mathf.Epsilon && sqrMagnitude <= maxDistanceSqr && Vector3.Dot(forward, val) / Mathf.Sqrt(sqrMagnitude) >= minAlignment && !IsAimCandidateObstructed(origin, candidate.Position); } private bool IsAimCandidateObstructed(Vector3 origin, Vector3 targetPosition) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return !_aimIgnoreObstacles && Physics.Linecast(origin, targetPosition, LayerMask.op_Implicit(GameInfo.LevelLayer) | LayerMask.op_Implicit(GameInfo.BoatLayer), (QueryTriggerInteraction)1); } private Vector3 GetPredictedTargetPosition(AimCandidate candidate, Vector3 origin, Vector3 shooterVelocity, float projectileSpeed, bool isHitScan) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (!_aimPredictMovement || isHitScan || projectileSpeed <= 0.01f) { return candidate.Position; } float num = Mathf.Clamp(Vector3.Distance(origin, candidate.Position) / projectileSpeed, 0f, 3f); return candidate.Position + (candidate.Velocity - shooterVelocity) * (num * _aimPredictionFactor); } private static Vector3 GetPlayerVelocity(Player player) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)player)) { return Vector3.zero; } if ((Object)(object)player == (Object)(object)Player.LocalPlayer && Object.op_Implicit((Object)(object)player.Movement)) { return player.Movement.Velocity; } if (Object.op_Implicit((Object)(object)player.Other)) { return player.Other.Velocity; } return Object.op_Implicit((Object)(object)player.Rigidbody) ? player.Rigidbody.linearVelocity : Vector3.zero; } internal void RedirectMagicBullet(Player owner, WeaponInfo weaponInfo, bool isLocal, Vector3 origin, ref Vector3 velocity) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (!_magicBullet || !isLocal || !Object.op_Implicit((Object)(object)owner) || (Object)(object)owner != (Object)(object)Player.LocalPlayer || weaponInfo == null || !Object.op_Implicit((Object)(object)weaponInfo.Weapon) || ((Vector3)(ref velocity)).sqrMagnitude <= Mathf.Epsilon) { return; } Item val = (Object.op_Implicit((Object)(object)owner.Holding) ? owner.Holding.HeldItem : null); if (!Object.op_Implicit((Object)(object)val) || (Object)(object)val.Weapon != (Object)(object)weaponInfo.Weapon) { return; } CollectAimCandidates(owner, val); Vector3 normalized = ((Vector3)(ref velocity)).normalized; if (TrySelectAimCandidate(origin, normalized, requireAcquireAngle: false, allowSticky: false, out var selected)) { bool flag = IsHitScan(weaponInfo); float magnitude = ((Vector3)(ref velocity)).magnitude; Vector3 val2 = GetPredictedTargetPosition(selected, origin, GetPlayerVelocity(owner), magnitude, flag); if (!flag && weaponInfo.ProjectileGravity > 0f) { float num = Mathf.Clamp(Vector3.Distance(origin, val2) / Mathf.Max(magnitude, 0.01f), 0f, 3f); val2 += Vector3.up * (0.5f * weaponInfo.ProjectileGravity * num * num); } Vector3 val3 = val2 - origin; if (((Vector3)(ref val3)).sqrMagnitude > Mathf.Epsilon) { velocity = ((Vector3)(ref val3)).normalized * magnitude; } } } private static bool IsHitScan(WeaponInfo weaponInfo) { try { return weaponInfo != null && Object.op_Implicit((Object)(object)ProjectileManager.Instance) && ProjectileManager.Instance.GetType(weaponInfo.ProjectileType).IsHitScan; } catch { return false; } } internal Item GetForcedCatchItem(Item original) { if (!_forceCatchItem || !IsHost) { return original; } int num = ParseInt(_catchItemIdText, -1); if (num < 0 || num > 254) { return original; } try { Item val = GameInfo.IDToItem((byte)num); return Object.op_Implicit((Object)(object)val) ? val : original; } catch { return original; } } internal void ApplyForcedCatchResult(Bait bait) { if (_forceCatchItem && IsHost && Object.op_Implicit((Object)(object)bait) && Object.op_Implicit((Object)(object)bait.ServerItemOnBait)) { Item serverItemOnBait = bait.ServerItemOnBait; serverItemOnBait._syncedRandomWeight.Value = _catchWeight; if (_forceCatchShiny && Object.op_Implicit((Object)(object)serverItemOnBait.Creature)) { serverItemOnBait.Creature.SetDrip(); } } } internal BetColor GetForcedRouletteColor(BetColor original) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (!_rouletteAlwaysWin || !IsHost || CasinoBetColorField == null) { return original; } try { return (BetColor)CasinoBetColorField.GetValue(null); } catch { return original; } } internal float GetRoulettePayout(float original) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 if (!_customRoulettePayout || !IsHost || !CasinoManager.IsBetting) { return original; } try { BetColor val = (BetColor)((CasinoBetColorField == null) ? 1 : ((int)(BetColor)CasinoBetColorField.GetValue(null))); return ((int)val == 2) ? _rouletteGreenMultiplier : _rouletteRedBlackMultiplier; } catch { return original; } } internal int AdjustWeaponDamage(Attachments attachments, int original) { if (!_customWeapon || !Object.op_Implicit((Object)(object)attachments) || !Object.op_Implicit((Object)(object)attachments.Weapon) || !Object.op_Implicit((Object)(object)Player.LocalPlayer) || !Object.op_Implicit((Object)(object)Player.LocalPlayer.Holding)) { return original; } Item heldItem = Player.LocalPlayer.Holding.HeldItem; if (!Object.op_Implicit((Object)(object)heldItem) || (Object)(object)heldItem.Weapon != (Object)(object)attachments.Weapon) { return original; } return Mathf.Clamp(Mathf.RoundToInt((float)original * _weaponDamageMultiplier), 0, 1000000); } private void EnsureUiResources() { //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Expected O, but got Unknown //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Expected O, but got Unknown //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Expected O, but got Unknown //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Expected O, but got Unknown //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Expected O, but got Unknown //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Expected O, but got Unknown //IL_06df: Expected O, but got Unknown //IL_0757: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Expected O, but got Unknown //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Expected O, but got Unknown //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07ec: Expected O, but got Unknown //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0831: Expected O, but got Unknown //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_084b: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Expected O, but got Unknown //IL_087a: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_089e: Unknown result type (might be due to invalid IL or missing references) //IL_08ab: Expected O, but got Unknown //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08d5: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Expected O, but got Unknown //IL_08e7: Unknown result type (might be due to invalid IL or missing references) //IL_08ec: Unknown result type (might be due to invalid IL or missing references) //IL_08f6: Expected O, but got Unknown //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Expected O, but got Unknown //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_097a: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: Unknown result type (might be due to invalid IL or missing references) //IL_09ad: Expected O, but got Unknown //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09bf: Expected O, but got Unknown //IL_09c5: Expected O, but got Unknown //IL_09cc: Unknown result type (might be due to invalid IL or missing references) //IL_09d1: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e5: Unknown result type (might be due to invalid IL or missing references) //IL_09ed: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a17: Unknown result type (might be due to invalid IL or missing references) //IL_0a1d: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a32: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)_uiSkin)) { Color fill = default(Color); ((Color)(ref fill))..ctor(0.15f, 0.18f, 0.25f, 0.65f); Color fill2 = default(Color); ((Color)(ref fill2))..ctor(0.2f, 0.24f, 0.32f, 0.55f); Color fill3 = default(Color); ((Color)(ref fill3))..ctor(0.18f, 0.22f, 0.3f, 0.5f); Color fill4 = default(Color); ((Color)(ref fill4))..ctor(0.3f, 0.4f, 0.6f, 0.35f); Color fill5 = default(Color); ((Color)(ref fill5))..ctor(0.4f, 0.5f, 0.8f, 0.4f); Color fill6 = default(Color); ((Color)(ref fill6))..ctor(0.12f, 0.15f, 0.22f, 0.55f); Color border = default(Color); ((Color)(ref border))..ctor(0.6f, 0.7f, 0.9f, 0.25f); Color border2 = default(Color); ((Color)(ref border2))..ctor(0.7f, 0.8f, 1f, 0.15f); Color val = default(Color); ((Color)(ref val))..ctor(0.45f, 0.7f, 1f, 0.9f); Color border3 = default(Color); ((Color)(ref border3))..ctor(0.5f, 0.75f, 1f, 0.6f); Color textColor = default(Color); ((Color)(ref textColor))..ctor(0.95f, 0.97f, 1f, 0.95f); Color textColor2 = default(Color); ((Color)(ref textColor2))..ctor(0.7f, 0.8f, 0.95f, 0.7f); Color textColor3 = default(Color); ((Color)(ref textColor3))..ctor(1f, 1f, 1f, 0.95f); Texture2D background = CreateGlassTexture(fill, border, 14); Texture2D background2 = CreateGlassTexture(fill2, border2, 12); Texture2D background3 = CreateGlassTexture(fill3, border2, 10); Texture2D background4 = CreateGlassTexture(fill6, border2, 12); Texture2D background5 = CreateGlassTexture(new Color(0.25f, 0.3f, 0.4f, 0.45f), border2, 8); Texture2D background6 = CreateGlassTexture(fill4, border3, 8); Texture2D background7 = CreateGlassTexture(fill5, val, 8); Texture2D background8 = CreateGlassTexture(new Color(0.2f, 0.25f, 0.35f, 0.4f), border2, 8); Texture2D background9 = CreateGlassTexture(val, val, 8); Texture2D background10 = CreateGlassTexture(new Color(0.2f, 0.25f, 0.35f, 0.5f), border2, 6); Texture2D background11 = CreateGlassTexture(new Color(0.3f, 0.4f, 0.55f, 0.55f), val, 6); Texture2D background12 = CreateGlassTexture(val, val, 10); _uiSkin = Object.Instantiate(GUI.skin); ((Object)_uiSkin).name = "HowToFish.Trainer.UI"; ((Object)_uiSkin).hideFlags = (HideFlags)61; _uiSkin.label.fontSize = 14; _uiSkin.label.wordWrap = true; _uiSkin.label.normal.textColor = textColor; _uiSkin.button.fontSize = 13; _uiSkin.button.fontStyle = (FontStyle)0; _uiSkin.button.alignment = (TextAnchor)4; _uiSkin.button.padding = new RectOffset(12, 12, 7, 7); _uiSkin.button.margin = new RectOffset(3, 3, 3, 3); _uiSkin.button.border = new RectOffset(6, 6, 6, 6); _uiSkin.button.normal.background = background5; _uiSkin.button.normal.textColor = textColor; _uiSkin.button.hover.background = background6; _uiSkin.button.hover.textColor = textColor; _uiSkin.button.active.background = background7; _uiSkin.button.active.textColor = val; _uiSkin.button.focused.background = background6; _uiSkin.button.focused.textColor = textColor; _uiSkin.button.onNormal.background = background7; _uiSkin.button.onNormal.textColor = textColor3; _uiSkin.button.onHover.background = background7; _uiSkin.button.onHover.textColor = textColor3; _uiSkin.textField.fontSize = 13; _uiSkin.textField.padding = new RectOffset(10, 10, 6, 6); _uiSkin.textField.border = new RectOffset(5, 5, 5, 5); _uiSkin.textField.normal.background = background10; _uiSkin.textField.normal.textColor = textColor; _uiSkin.textField.hover.background = background11; _uiSkin.textField.hover.textColor = textColor; _uiSkin.textField.focused.background = background11; _uiSkin.textField.focused.textColor = textColor; _uiSkin.toggle.fontSize = 13; _uiSkin.toggle.fontStyle = (FontStyle)0; _uiSkin.toggle.padding = new RectOffset(22, 6, 4, 4); _uiSkin.toggle.normal.textColor = textColor; _uiSkin.toggle.hover.textColor = textColor; _uiSkin.toggle.active.textColor = textColor; _uiSkin.toggle.focused.textColor = textColor; _uiSkin.toggle.onNormal.textColor = val; _uiSkin.toggle.onHover.textColor = val; _uiSkin.toggle.onActive.textColor = val; _uiSkin.toggle.onFocused.textColor = val; _uiSkin.scrollView.normal.background = null; _uiSkin.scrollView.hover.background = null; GUIStyle val2 = new GUIStyle(_uiSkin.window); val2.normal.background = background; val2.normal.textColor = textColor; val2.border = new RectOffset(14, 14, 14, 14); val2.padding = new RectOffset(0, 0, 0, 0); _windowStyle = val2; _headerStyle = CreateAreaStyle(background2, 24, 24, 16, 12); _sidebarStyle = CreateAreaStyle(background4, 16, 16, 16, 14); _contentStyle = CreateAreaStyle(background, 20, 20, 16, 14); _footerStyle = CreateAreaStyle(background2, 20, 20, 12, 10); _cardStyle = CreateAreaStyle(background3, 14, 14, 12, 12); _cardStyle.margin = new RectOffset(0, 8, 0, 0); GUIStyle val3 = new GUIStyle(_uiSkin.label) { fontSize = 22, fontStyle = (FontStyle)1, alignment = (TextAnchor)3, wordWrap = false }; val3.normal.textColor = textColor; _titleStyle = val3; GUIStyle val4 = new GUIStyle(_uiSkin.label) { fontSize = 20, fontStyle = (FontStyle)1, alignment = (TextAnchor)3, wordWrap = false }; val4.normal.textColor = val; _pageTitleStyle = val4; GUIStyle val5 = new GUIStyle(_uiSkin.label) { fontSize = 14, fontStyle = (FontStyle)1, alignment = (TextAnchor)3, wordWrap = true }; val5.normal.textColor = textColor; _sectionTitleStyle = val5; GUIStyle val6 = new GUIStyle(_uiSkin.label) { fontSize = 12, alignment = (TextAnchor)3, wordWrap = true }; val6.normal.textColor = textColor2; _mutedStyle = val6; GUIStyle val7 = new GUIStyle(_uiSkin.label) { fontSize = 13, alignment = (TextAnchor)3, wordWrap = false }; val7.normal.textColor = val; _statusStyle = val7; GUIStyle val8 = new GUIStyle(_uiSkin.label) { fontSize = 12, fontStyle = (FontStyle)1, alignment = (TextAnchor)4, padding = new RectOffset(10, 10, 4, 4), border = new RectOffset(8, 8, 8, 8) }; val8.normal.background = background12; val8.normal.textColor = textColor3; val8.wordWrap = false; _badgeStyle = val8; GUIStyle val9 = new GUIStyle(_uiSkin.button) { alignment = (TextAnchor)3, fontSize = 13, fontStyle = (FontStyle)0 }; val9.normal.background = background8; val9.normal.textColor = textColor2; val9.hover.background = background6; val9.hover.textColor = textColor; val9.active.background = background7; val9.active.textColor = val; val9.border = new RectOffset(6, 6, 6, 6); val9.padding = new RectOffset(16, 10, 8, 8); _navStyle = val9; GUIStyle val10 = new GUIStyle(_navStyle); val10.normal.background = background9; val10.normal.textColor = textColor3; val10.hover.background = background9; val10.hover.textColor = textColor3; val10.active.background = background9; val10.active.textColor = textColor3; val10.fontStyle = (FontStyle)1; _navActiveStyle = val10; } } private GUIStyle CreateAreaStyle(Texture2D background, int left, int right, int top, int bottom) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0062: Expected O, but got Unknown GUIStyle val = new GUIStyle(_uiSkin.box); val.normal.background = background; val.normal.textColor = Color.white; val.border = new RectOffset(7, 7, 7, 7); val.padding = new RectOffset(left, right, top, bottom); val.margin = new RectOffset(0, 0, 0, 0); return val; } private Texture2D CreateGlassTexture(Color fill, Color border, int radius) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) int num = 64; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false) { hideFlags = (HideFlags)61, wrapMode = (TextureWrapMode)1, filterMode = (FilterMode)1 }; Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num3 = ((float)i - num2) / num2; float num4 = ((float)j - num2) / num2; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4); float num6 = Mathf.Max(Mathf.Abs(num3) * num2, Mathf.Abs(num4) * num2); float num7 = Mathf.Min((float)radius, num2 - 1f); if (num6 > num2) { float num8 = Mathf.Sign(num3) * (num2 - num7); float num9 = Mathf.Sign(num4) * (num2 - num7); float num10 = Mathf.Sqrt(Mathf.Pow(Mathf.Abs(num3) * num2 - num8, 2f) + Mathf.Pow(Mathf.Abs(num4) * num2 - num9, 2f)); if (num10 > num7) { array[i * num + j] = Color.clear; continue; } } float num11 = Mathf.Clamp01(1f - num5 * 0.6f); float num12 = (Mathf.PerlinNoise((float)i * 0.1f, (float)j * 0.1f) - 0.5f) * 0.08f; Color val2 = fill; val2.a = Mathf.Clamp01(val2.a + num12 * 0.3f); float num13 = Mathf.Pow(1f - Mathf.Abs(num5), 2f) * 0.15f; val2.r += num13 * 0.3f; val2.g += num13 * 0.4f; val2.b += num13 * 0.5f; float num14 = 0f; if (num6 > num2 - 2f) { num14 = 1f; } if (num14 > 0.5f) { val2 = Color.Lerp(val2, border, 0.6f); val2.a = Mathf.Clamp01(val2.a + 0.15f); } float num15 = 1f; if (num5 > 0.82f) { num15 = 1f - (num5 - 0.82f) / 0.18f; } val2.a *= Mathf.Clamp01(num15); float num16 = Mathf.Clamp01(1f - Mathf.Abs(num3 + 0.3f) * 1.5f - Mathf.Abs(num4 + 0.3f) * 1.5f) * 0.2f; val2.r += num16; val2.g += num16 * 0.8f; val2.b += num16 * 0.6f; array[i * num + j] = val2; } } val.SetPixels(array); val.Apply(); _uiTextures.Add(val); return val; } } public enum CrosshairStyle { Dot, Cross, TShape, Circle, DotWithCircle, Crosshair } public static class CrosshairState { public static int Mode = 2; public static CrosshairStyle Style = CrosshairStyle.Dot; public static Color Color = Color.white; public static float Size = 10f; public static float Thickness = 2f; public static float Gap = 4f; public static float TLength = 15f; public static bool ShowOutline = true; public static bool ShowSpreadRing = true; public static readonly string[] ModeNames = new string[3] { "关闭", "固定中心", "跟随枪口" }; public static readonly string[] ModeDescs = new string[3] { "不显示准星", "固定在屏幕正中央", "跟随武器指向位置" }; public static readonly string[] StyleNames = new string[6] { "小点", "十字", "T型", "圆圈", "点+圆圈", "准星" }; } public class CrosshairOverlay : MonoBehaviour { private Texture2D _dotTexture; private Texture2D _circleTexture; private Texture2D _whiteTexture; private void Start() { _dotTexture = CreateDotTexture(); _circleTexture = CreateCircleTexture(); _whiteTexture = Texture2D.whiteTexture; ((Object)_whiteTexture).hideFlags = (HideFlags)61; } private Texture2D CreateDotTexture() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) int num = 64; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); ((Object)val).hideFlags = (HideFlags)61; Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f - 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num3 = (float)j - (float)num / 2f; float num4 = (float)i - (float)num / 2f; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4); float num6 = Mathf.Clamp01(num2 - num5 + 0.5f); array[i * num + j] = new Color(1f, 1f, 1f, num6); } } val.SetPixels(array); val.Apply(); return val; } private Texture2D CreateCircleTexture() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) int num = 128; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); ((Object)val).hideFlags = (HideFlags)61; Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f - 4f; float num3 = 3f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = (float)j - (float)num / 2f; float num5 = (float)i - (float)num / 2f; float num6 = Mathf.Sqrt(num4 * num4 + num5 * num5); float num7 = Mathf.Abs(num6 - num2); float num8 = Mathf.Clamp01(num3 - num7 + 0.5f); array[i * num + j] = new Color(1f, 1f, 1f, num8); } } val.SetPixels(array); val.Apply(); return val; } private void OnGUI() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if (CrosshairState.Mode == 0) { return; } Vector2 center = default(Vector2); ((Vector2)(ref center))..ctor((float)Screen.width / 2f, (float)Screen.height / 2f); if (CrosshairState.Mode == 2) { try { Player localPlayer = Player.LocalPlayer; if ((Object)(object)localPlayer != (Object)null && (Object)(object)localPlayer.CurCam != (Object)null) { Camera curCam = localPlayer.CurCam; Vector3 val = curCam.WorldToScreenPoint(((Component)localPlayer.CurCam).transform.position + ((Component)localPlayer.CurCam).transform.forward * 50f); if (val.z > 0f) { center = new Vector2(val.x, (float)Screen.height - val.y); } } } catch { } } DrawCrosshair(center); } private void DrawCrosshair(Vector2 center) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00c5: Unknown result type (might be due to invalid IL or missing references) Color color = CrosshairState.Color; float size = CrosshairState.Size; float thickness = CrosshairState.Thickness; float gap = CrosshairState.Gap; float tLength = CrosshairState.TLength; GUI.color = color; if (CrosshairState.ShowOutline) { GUI.color = Color.black; DrawCrosshairShape(center + new Vector2(1f, 0f), size, thickness, gap, tLength); DrawCrosshairShape(center + new Vector2(-1f, 0f), size, thickness, gap, tLength); DrawCrosshairShape(center + new Vector2(0f, 1f), size, thickness, gap, tLength); DrawCrosshairShape(center + new Vector2(0f, -1f), size, thickness, gap, tLength); GUI.color = color; } DrawCrosshairShape(center, size, thickness, gap, tLength); GUI.color = Color.white; } private void DrawCrosshairShape(Vector2 center, float size, float thickness, float gap, float tLength) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) switch (CrosshairState.Style) { case CrosshairStyle.Dot: GUI.DrawTexture(new Rect(center.x - size / 2f, center.y - size / 2f, size, size), (Texture)(object)_dotTexture); break; case CrosshairStyle.Cross: GUI.DrawTexture(new Rect(center.x - size / 2f, center.y - thickness / 2f, size, thickness), (Texture)(object)_whiteTexture); GUI.DrawTexture(new Rect(center.x - thickness / 2f, center.y - size / 2f, thickness, size), (Texture)(object)_whiteTexture); break; case CrosshairStyle.TShape: GUI.DrawTexture(new Rect(center.x - size / 2f, center.y - gap - thickness / 2f, size, thickness), (Texture)(object)_whiteTexture); GUI.DrawTexture(new Rect(center.x - thickness / 2f, center.y - gap, thickness, tLength), (Texture)(object)_whiteTexture); break; case CrosshairStyle.Circle: GUI.DrawTexture(new Rect(center.x - size / 2f, center.y - size / 2f, size, size), (Texture)(object)_circleTexture); break; case CrosshairStyle.DotWithCircle: GUI.DrawTexture(new Rect(center.x - size / 4f, center.y - size / 4f, size / 2f, size / 2f), (Texture)(object)_dotTexture); GUI.DrawTexture(new Rect(center.x - size / 2f, center.y - size / 2f, size, size), (Texture)(object)_circleTexture); break; case CrosshairStyle.Crosshair: { float num = size / 2f; GUI.DrawTexture(new Rect(center.x - thickness / 2f, center.y - num, thickness, num - gap), (Texture)(object)_whiteTexture); GUI.DrawTexture(new Rect(center.x - thickness / 2f, center.y + gap, thickness, num - gap), (Texture)(object)_whiteTexture); GUI.DrawTexture(new Rect(center.x - num, center.y - thickness / 2f, num - gap, thickness), (Texture)(object)_whiteTexture); GUI.DrawTexture(new Rect(center.x + gap, center.y - thickness / 2f, num - gap, thickness), (Texture)(object)_whiteTexture); break; } } } private void OnDestroy() { if ((Object)(object)_dotTexture != (Object)null) { Object.Destroy((Object)(object)_dotTexture); } if ((Object)(object)_circleTexture != (Object)null) { Object.Destroy((Object)(object)_circleTexture); } } } [HarmonyPatch(typeof(Attachments), "get_Damage")] internal static class WeaponDamagePatch { private static void Postfix(Attachments __instance, ref int __result) { TrainerPlugin instance = TrainerPlugin.Instance; if ((Object)(object)instance != (Object)null) { __result = instance.AdjustWeaponDamage(__instance, __result); } } } }