Make OutgoingPacket Not extending Packet

This commit is contained in:
Him188 2020-01-06 18:33:57 +08:00
parent a63c925cbc
commit 7187526931
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import kotlinx.io.core.BytePacketBuilder
import kotlinx.io.core.ByteReadPacket
import kotlinx.io.core.buildPacket
import kotlinx.io.core.writeFully
import net.mamoe.mirai.data.Packet
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.PacketId
import net.mamoe.mirai.qqandroid.utils.ECDH
@ -24,7 +23,7 @@ internal class OutgoingPacket constructor(
val packetId: PacketId,
val sequenceId: Short,
val delegate: ByteReadPacket
) : Packet {
) {
val name: String by lazy {
name ?: packetId.toString()
}

View File

@ -25,7 +25,7 @@ class OutgoingPacket(
val packetId: PacketId,
val sequenceId: UShort,
val delegate: ByteReadPacket
) : Packet {
) {
val name: String by lazy {
name ?: packetId.toString()
}