From 1cc1afdb08dd24b950f9f3d2e56095f98387c6bb Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Sat, 17 Oct 2026 15:57:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(hook):=20GameMode=20hook=20=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=94=B9=E4=B8=BA=E6=96=B0=E7=89=88=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E9=94=AE=EF=BC=88jc/ic=EF=BC=89=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=B7=A5=E5=85=B7=E9=9D=99=E9=BB=98=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 根因:新版导出键语义漂移 —— \$.ac 变成两字段数据类 \、\ \$.zb 变成 ydt,不再是「取 gmt 实例 / ght 类」 - 新版对应关系:\ \$.jc = dct(scene) 取 ght 实例;\ \$.ic = wct 即 ght 类;\ \$.kc = gct(scene) 取 GameMode 实体 - hook 目标改为 \ \$.jc,并继续 hook wct.prototype 全方法作为兜底 - 重新生成 hornet_bundle.js 并同步 unpacked --- .../play/static/js/unpacked/hornet_bundle.js | 18 +++++++++--------- 3dtank_bundle.js | 18 +++++++++--------- tools/hook_gamemode.js | 18 +++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/3dtank.com/play/static/js/unpacked/hornet_bundle.js b/3dtank.com/play/static/js/unpacked/hornet_bundle.js index e0936a8..13b0fb6 100644 --- a/3dtank.com/play/static/js/unpacked/hornet_bundle.js +++ b/3dtank.com/play/static/js/unpacked/hornet_bundle.js @@ -13,12 +13,12 @@ // 3. 定时器主动验证引用有效性,失效则重置 // 4. trySetGameMode 验证坦克列表,避免捕获未初始化实例 // -// 原理: -// module_87072.$_$.ac = yht 函数(接收场景,返回 ght 实例) -// module_87072.$_$.zb = ght 类(GameMode 组件类) -// module_87072.$_$.bc = kht 函数(接收场景,返回 GameMode entity) -// yht(scene).xzq_1 = Tht 实例(坦克列表管理器) -// Tht.z11b() = a12c_1(坦克列表,Lx 实例) +// 原理(新版 main.7cfa4058): +// module_87072.$_$.jc = dct 函数(接收 scene,返回 ght 实例) ← 旧版是 $_$.ac,新版键位漂移 +// module_87072.$_$.ic = wct 类(ght / GameMode 组件类) ← 旧版是 $_$.zb +// module_87072.$_$.kc = gct 函数(接收 scene,返回 GameMode 实体)← 旧版是 $_$.bc +// dct(scene).m10b_1 = 坦克列表管理器 +// 坦克列表 = dct(scene).m10b_1.j11y() (function() { console.log('===== GameMode Hook v2 开始 ====='); @@ -36,8 +36,8 @@ return; } - var ghtClass = mod.$_$.zb; - var yhtFunc = mod.$_$.ac; + var ghtClass = mod.$_$.ic; // 新版:wct(旧版 $_$.zb) + var yhtFunc = mod.$_$.jc; // 新版:dct(旧版 $_$.ac) console.log('[1] ght 类:', ghtClass ? ghtClass.name : '未找到'); console.log('[1] yht 函数:', typeof yhtFunc === 'function' ? '已找到' : '未找到'); @@ -71,7 +71,7 @@ if (typeof yhtFunc === 'function' && !window.__yht_hooked__) { window.__yht_hooked__ = true; var origYht = yhtFunc; - mod.$_$.ac = function(t) { + mod.$_$.jc = function(t) { var result = origYht.call(this, t); if (result) trySetGameMode(result, 'yht'); return result; diff --git a/3dtank_bundle.js b/3dtank_bundle.js index e0936a8..13b0fb6 100644 --- a/3dtank_bundle.js +++ b/3dtank_bundle.js @@ -13,12 +13,12 @@ // 3. 定时器主动验证引用有效性,失效则重置 // 4. trySetGameMode 验证坦克列表,避免捕获未初始化实例 // -// 原理: -// module_87072.$_$.ac = yht 函数(接收场景,返回 ght 实例) -// module_87072.$_$.zb = ght 类(GameMode 组件类) -// module_87072.$_$.bc = kht 函数(接收场景,返回 GameMode entity) -// yht(scene).xzq_1 = Tht 实例(坦克列表管理器) -// Tht.z11b() = a12c_1(坦克列表,Lx 实例) +// 原理(新版 main.7cfa4058): +// module_87072.$_$.jc = dct 函数(接收 scene,返回 ght 实例) ← 旧版是 $_$.ac,新版键位漂移 +// module_87072.$_$.ic = wct 类(ght / GameMode 组件类) ← 旧版是 $_$.zb +// module_87072.$_$.kc = gct 函数(接收 scene,返回 GameMode 实体)← 旧版是 $_$.bc +// dct(scene).m10b_1 = 坦克列表管理器 +// 坦克列表 = dct(scene).m10b_1.j11y() (function() { console.log('===== GameMode Hook v2 开始 ====='); @@ -36,8 +36,8 @@ return; } - var ghtClass = mod.$_$.zb; - var yhtFunc = mod.$_$.ac; + var ghtClass = mod.$_$.ic; // 新版:wct(旧版 $_$.zb) + var yhtFunc = mod.$_$.jc; // 新版:dct(旧版 $_$.ac) console.log('[1] ght 类:', ghtClass ? ghtClass.name : '未找到'); console.log('[1] yht 函数:', typeof yhtFunc === 'function' ? '已找到' : '未找到'); @@ -71,7 +71,7 @@ if (typeof yhtFunc === 'function' && !window.__yht_hooked__) { window.__yht_hooked__ = true; var origYht = yhtFunc; - mod.$_$.ac = function(t) { + mod.$_$.jc = function(t) { var result = origYht.call(this, t); if (result) trySetGameMode(result, 'yht'); return result; diff --git a/tools/hook_gamemode.js b/tools/hook_gamemode.js index 05b9d46..cb0c93f 100644 --- a/tools/hook_gamemode.js +++ b/tools/hook_gamemode.js @@ -5,12 +5,12 @@ // 3. 定时器主动验证引用有效性,失效则重置 // 4. trySetGameMode 验证坦克列表,避免捕获未初始化实例 // -// 原理: -// module_87072.$_$.ac = yht 函数(接收场景,返回 ght 实例) -// module_87072.$_$.zb = ght 类(GameMode 组件类) -// module_87072.$_$.bc = kht 函数(接收场景,返回 GameMode entity) -// yht(scene).xzq_1 = Tht 实例(坦克列表管理器) -// Tht.z11b() = a12c_1(坦克列表,Lx 实例) +// 原理(新版 main.7cfa4058): +// module_87072.$_$.jc = dct 函数(接收 scene,返回 ght 实例) ← 旧版是 $_$.ac,新版键位漂移 +// module_87072.$_$.ic = wct 类(ght / GameMode 组件类) ← 旧版是 $_$.zb +// module_87072.$_$.kc = gct 函数(接收 scene,返回 GameMode 实体)← 旧版是 $_$.bc +// dct(scene).m10b_1 = 坦克列表管理器 +// 坦克列表 = dct(scene).m10b_1.j11y() (function() { console.log('===== GameMode Hook v2 开始 ====='); @@ -28,8 +28,8 @@ return; } - var ghtClass = mod.$_$.zb; - var yhtFunc = mod.$_$.ac; + var ghtClass = mod.$_$.ic; // 新版:wct(旧版 $_$.zb) + var yhtFunc = mod.$_$.jc; // 新版:dct(旧版 $_$.ac) console.log('[1] ght 类:', ghtClass ? ghtClass.name : '未找到'); console.log('[1] yht 函数:', typeof yhtFunc === 'function' ? '已找到' : '未找到'); @@ -63,7 +63,7 @@ if (typeof yhtFunc === 'function' && !window.__yht_hooked__) { window.__yht_hooked__ = true; var origYht = yhtFunc; - mod.$_$.ac = function(t) { + mod.$_$.jc = function(t) { var result = origYht.call(this, t); if (result) trySetGameMode(result, 'yht'); return result;