Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
54a0967e
Commit
54a0967e
authored
Nov 16, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using enum
parent
fd2edcbd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
287 additions
and
159 deletions
+287
-159
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/FaceID.kt
...e/src/commonMain/kotlin/net.mamoe.mirai/message/FaceID.kt
+285
-157
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/Message.kt
.../src/commonMain/kotlin/net.mamoe.mirai/message/Message.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/internal/MessageDataInternal.kt
...n/net.mamoe.mirai/message/internal/MessageDataInternal.kt
+1
-1
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/FaceID.kt
View file @
54a0967e
This diff is collapsed.
Click to expand it.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/Message.kt
View file @
54a0967e
...
@@ -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
:
FaceI
D
)
:
Message
{
inline
class
Face
(
val
id
:
FaceI
d
)
:
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
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/internal/MessageDataInternal.kt
View file @
54a0967e
...
@@ -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
=
FaceI
D
.
ofI
d
(
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment