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" }