From 5cb0ebfe4710269aa741caedd218905e0de47de8 Mon Sep 17 00:00:00 2001 From: liujiahua123123 Date: Sun, 18 Aug 2019 13:58:37 +0800 Subject: [PATCH] packetID --- .../packet/client/login/ClientPasswordSubmissionPacket.kt | 3 ++- .../network/packet/server/ServerTouchResponsePacket.kt | 2 +- mirai-core/src/test/java/PacketTest.kt | 7 ------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mirai-core/src/main/java/net/mamoe/mirai/network/packet/client/login/ClientPasswordSubmissionPacket.kt b/mirai-core/src/main/java/net/mamoe/mirai/network/packet/client/login/ClientPasswordSubmissionPacket.kt index fb633157e..66cb6ebe6 100644 --- a/mirai-core/src/main/java/net/mamoe/mirai/network/packet/client/login/ClientPasswordSubmissionPacket.kt +++ b/mirai-core/src/main/java/net/mamoe/mirai/network/packet/client/login/ClientPasswordSubmissionPacket.kt @@ -1,7 +1,8 @@ -package net.mamoe.mirai.network.packet.client +package net.mamoe.mirai.network.packet.client.login import net.mamoe.mirai.network.Protocol import net.mamoe.mirai.network.packet.PacketId +import net.mamoe.mirai.network.packet.client.* import net.mamoe.mirai.util.TEACryptor import net.mamoe.mirai.util.getCrc32 import net.mamoe.mirai.util.getRandomKey diff --git a/mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/ServerTouchResponsePacket.kt b/mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/ServerTouchResponsePacket.kt index e45caf75c..239f3bf38 100644 --- a/mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/ServerTouchResponsePacket.kt +++ b/mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/ServerTouchResponsePacket.kt @@ -35,7 +35,7 @@ class ServerTouchResponsePacket(private val type: Type, inputStream: DataInputSt when (data.readByte().toInt()) { 0xFE -> { - println("0xfe") + data.skip(94) serverIP = data.readIP() } 0X00 -> { diff --git a/mirai-core/src/test/java/PacketTest.kt b/mirai-core/src/test/java/PacketTest.kt index e3dd25028..514ebc04b 100644 --- a/mirai-core/src/test/java/PacketTest.kt +++ b/mirai-core/src/test/java/PacketTest.kt @@ -1,10 +1,3 @@ -import net.mamoe.mirai.network.packet.client.ClientPasswordSubmissionPacket -import net.mamoe.mirai.network.packet.client.toHexString -import net.mamoe.mirai.network.packet.server.ServerTouchResponsePacket -import net.mamoe.mirai.util.hexToBytes -import net.mamoe.mirai.util.toHexString -import java.io.DataInputStream - @ExperimentalUnsignedTypes fun main(){ /*