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
a849119f
Commit
a849119f
authored
Feb 01, 2020
by
jiahua.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Friend List Complete
parent
579e3496
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt
...moe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt
+1
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/jce/RequestPacket.kt
...irai/qqandroid/network/protocol/data/jce/RequestPacket.kt
+10
-2
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/list/FriendListPacket.kt
...qandroid/network/protocol/packet/list/FriendListPacket.kt
+3
-4
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt
View file @
a849119f
...
@@ -103,6 +103,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
...
@@ -103,6 +103,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
}
}
override
suspend
fun
init
()
{
override
suspend
fun
init
()
{
delay
(
5000
)
bot
.
logger
.
info
(
"开始加载好友信息"
)
bot
.
logger
.
info
(
"开始加载好友信息"
)
this
@QQAndroidBotNetworkHandler
.
subscribeAlways
<
ForceOfflineEvent
>
{
this
@QQAndroidBotNetworkHandler
.
subscribeAlways
<
ForceOfflineEvent
>
{
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/jce/RequestPacket.kt
View file @
a849119f
package
net.mamoe.mirai.qqandroid.network.protocol.data.jce
package
net.mamoe.mirai.qqandroid.network.protocol.data.jce
import
kotlinx.atomicfu.AtomicInt
import
kotlinx.atomicfu.atomic
import
kotlinx.serialization.SerialId
import
kotlinx.serialization.SerialId
import
kotlinx.serialization.Serializable
import
kotlinx.serialization.Serializable
import
net.mamoe.mirai.qqandroid.io.JceStruct
import
net.mamoe.mirai.qqandroid.io.JceStruct
...
@@ -12,14 +14,20 @@ internal class RequestPacket(
...
@@ -12,14 +14,20 @@ internal class RequestPacket(
@SerialId
(
1
)
val
iVersion
:
Short
=
3
,
@SerialId
(
1
)
val
iVersion
:
Short
=
3
,
@SerialId
(
2
)
val
cPacketType
:
Byte
=
0
,
@SerialId
(
2
)
val
cPacketType
:
Byte
=
0
,
@SerialId
(
3
)
val
iMessageType
:
Int
=
0
,
@SerialId
(
3
)
val
iMessageType
:
Int
=
0
,
@SerialId
(
4
)
val
iRequestId
:
Int
=
0
,
@SerialId
(
4
)
val
iRequestId
:
Int
=
nextRequestPacketRequestId
()
,
@SerialId
(
5
)
val
sServantName
:
String
=
""
,
@SerialId
(
5
)
val
sServantName
:
String
=
""
,
@SerialId
(
6
)
val
sFuncName
:
String
=
""
,
@SerialId
(
6
)
val
sFuncName
:
String
=
""
,
@SerialId
(
7
)
val
sBuffer
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
7
)
val
sBuffer
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
8
)
val
iTimeout
:
Int
=
0
,
@SerialId
(
8
)
val
iTimeout
:
Int
=
0
,
@SerialId
(
9
)
val
context
:
Map
<
String
,
String
>
=
EMPTY_MAP
,
@SerialId
(
9
)
val
context
:
Map
<
String
,
String
>
=
EMPTY_MAP
,
@SerialId
(
10
)
val
status
:
Map
<
String
,
String
>
=
EMPTY_MAP
@SerialId
(
10
)
val
status
:
Map
<
String
,
String
>
=
EMPTY_MAP
)
:
JceStruct
)
:
JceStruct
{
}
private
val
requestPacketRequestId
:
AtomicInt
=
atomic
(
10000000
)
internal
fun
nextRequestPacketRequestId
():
Int
=
requestPacketRequestId
.
getAndAdd
(
1
)
@Serializable
@Serializable
internal
class
RequestDataVersion3
(
internal
class
RequestDataVersion3
(
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/list/FriendListPacket.kt
View file @
a849119f
...
@@ -118,16 +118,15 @@ internal class FriendList {
...
@@ -118,16 +118,15 @@ internal class FriendList {
iVersion
=
3
,
iVersion
=
3
,
cPacketType
=
0
x003
,
cPacketType
=
0
x003
,
iMessageType
=
0
x00000
,
iMessageType
=
0
x00000
,
iRequestId
=
1921334514
,
sBuffer
=
jceRequestSBuffer
(
sBuffer
=
jceRequestSBuffer
(
"FL"
,
"FL"
,
GetFriendListReq
.
serializer
(),
GetFriendListReq
.
serializer
(),
GetFriendListReq
(
GetFriendListReq
(
reqtype
=
3
,
reqtype
=
3
,
ifReflush
=
if
(
friendListStartIndex
<=
0
)
{
ifReflush
=
if
(
friendListStartIndex
==
0
)
{
0
}
else
{
1
1
}
else
{
0
},
},
uin
=
client
.
uin
,
uin
=
client
.
uin
,
startIndex
=
friendListStartIndex
.
toShort
(),
startIndex
=
friendListStartIndex
.
toShort
(),
...
...
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