From 2812f2c1d366f21bacdd4f087087bbcab250d241 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 15 Dec 2019 15:56:05 +0800 Subject: [PATCH] Add remaining for debugging --- .../network/protocol/tim/packet/event/MemberMute.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/MemberMute.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/MemberMute.kt index ceb838afb..c929d9cbb 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/MemberMute.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/MemberMute.kt @@ -12,6 +12,7 @@ import net.mamoe.mirai.contact.Member import net.mamoe.mirai.getGroup import net.mamoe.mirai.qqAccount import net.mamoe.mirai.utils.io.debugPrintIfFail +import net.mamoe.mirai.utils.io.readRemainingBytes import net.mamoe.mirai.utils.io.toUHexString // region mute @@ -77,10 +78,12 @@ sealed class UnmuteEvent : EventOfMute() { // endregion -internal object Unknown0x02DCPacketFlag0x0EMaybeMutePacket : EventOfMute() { +internal class Unknown0x02DCPacketFlag0x0EMaybeMutePacket( + val remaining: ByteArray +) : EventOfMute() { override val operator: Member get() = error("Getting a field from Unknown0x02DCPacketFlag0x0EMaybeMutePacket") override val group: Group get() = error("Getting a field from Unknown0x02DCPacketFlag0x0EMaybeMutePacket") - override fun toString(): String = "Unknown0x02DCPacketFlag0x0EMaybeMutePacket" + override fun toString(): String = "Unknown0x02DCPacketFlag0x0EMaybeMutePacket(remaining=${remaining.toUHexString()})" } sealed class EventOfMute : EventPacket { @@ -124,7 +127,7 @@ internal object MemberMuteEventPacketParserAndHandler : KnownEventParserAndHandl 0x0Eu -> { //00 00 00 0E 00 08 00 02 00 01 00 // 0A 00 04 01 00 00 00 35 DB 60 A2 11 00 3E 08 07 20 A2 C1 ED AE 03 5A 34 08 A2 FF 8C F0 03 1A 19 08 F4 0E 10 FE 8C D3 EF 05 18 84 A1 F8 F9 06 20 00 28 00 30 A2 FF 8C F0 03 2A 0D 08 00 12 09 08 F4 0E 10 00 18 01 20 00 30 00 38 00 - Unknown0x02DCPacketFlag0x0EMaybeMutePacket + Unknown0x02DCPacketFlag0x0EMaybeMutePacket(readRemainingBytes()) } 0x11u -> debugPrintIfFail("解析禁言包(0x02DC)时"){ // 猜测这个失败是撤回??