mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 09:10:11 +08:00
Make OutgoingPacket Not extending Packet
This commit is contained in:
parent
a63c925cbc
commit
7187526931
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user