Commit 71875269 authored by Him188's avatar Him188

Make OutgoingPacket Not extending Packet

parent a63c925c
......@@ -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()
}
......
......@@ -25,7 +25,7 @@ class OutgoingPacket(
val packetId: PacketId,
val sequenceId: UShort,
val delegate: ByteReadPacket
) : Packet {
) {
val name: String by lazy {
name ?: packetId.toString()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment