Commit 71875269 authored by Him188's avatar Him188

Make OutgoingPacket Not extending Packet

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