Commit 54a0967e authored by Him188's avatar Him188

Avoid using enum

parent fd2edcbd
...@@ -205,7 +205,7 @@ inline class At(val targetQQ: UInt) : Message { ...@@ -205,7 +205,7 @@ inline class At(val targetQQ: UInt) : Message {
/** /**
* QQ 自带表情 * QQ 自带表情
*/ */
inline class Face(val id: FaceID) : Message { inline class Face(val id: FaceId) : Message {
override val stringValue: String get() = "[face${id.value}]" override val stringValue: String get() = "[face${id.value}]"
override fun toString(): String = stringValue override fun toString(): String = stringValue
......
...@@ -11,7 +11,7 @@ internal fun IoBuffer.parseMessageFace(): Face { ...@@ -11,7 +11,7 @@ internal fun IoBuffer.parseMessageFace(): Face {
//00 01 0C 0B 00 08 00 01 00 04 52 CC F5 D0 FF 00 02 14 4D //00 01 0C 0B 00 08 00 01 00 04 52 CC F5 D0 FF 00 02 14 4D
discardExact(1) discardExact(1)
val id1 = FaceID.ofId(readLVNumber().toInt().toUByte())//可能这个是id, 也可能下面那个 val id1 = FaceId(readLVNumber().toInt().toUByte())//可能这个是id, 也可能下面那个
discardExact(readByte().toLong()) // -1 discardExact(readByte().toLong()) // -1
readLVNumber()//某id? readLVNumber()//某id?
return Face(id1) return Face(id1)
......
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