From ffba3573ba9d0c2e021db3709a05cda923187b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 13 Oct 2024 14:05:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8C=BA=E5=88=86arch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis/packet.ts | 4 ++-- src/core/external/offset.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/apis/packet.ts b/src/core/apis/packet.ts index a6ba67c9..3a9ee689 100644 --- a/src/core/apis/packet.ts +++ b/src/core/apis/packet.ts @@ -1,5 +1,5 @@ import { InstanceContext, NapCatCore } from '..'; -import { RequestUtil } from '@/common/request'; +import * as os from 'os'; import offset from '@/core/external/offset.json'; import * as crypto from 'crypto'; import { PacketClient } from '../helper/packet'; @@ -39,7 +39,7 @@ export class NTQQPacketApi { this.serverUrl = serverUrl; this.qqversion = qqversion; let offsetTable: OffsetType = offset; - if (!offsetTable[qqversion]) return false; + if (!offsetTable[qqversion + '-' + os.arch()]) return false; let url = 'ws://' + this.serverUrl + '/ws'; this.PacketClient = new PacketClient(url, this.core.context.logger); await this.PacketClient.connect(); diff --git a/src/core/external/offset.json b/src/core/external/offset.json index 2956b666..fc9cf959 100644 --- a/src/core/external/offset.json +++ b/src/core/external/offset.json @@ -1,13 +1,13 @@ { - "3.2.12-28418": { + "3.2.12-28418-x64": { "recv": "A0723E0", "send": "A06EAE0" }, - "9.9.15-28418": { + "9.9.15-28418-x64": { "recv": "37A9004", "send": "37A4BD0" }, - "9.9.15-28498": { + "9.9.15-28498-x64": { "recv": "37A9004", "send": "37A4BD0" }