From 7ac65df02de1948d40efeea542d933f520406a42 Mon Sep 17 00:00:00 2001 From: sandtechnology <20417547+sandtechnology@users.noreply.github.com> Date: Mon, 27 Sep 2021 22:39:24 +0800 Subject: [PATCH] Update struct data (#1530) --- .../network/protocol/data/jce/TroopList.kt | 24 ++- .../network/protocol/data/proto/Cmd0x857.kt | 109 +++++++++++- .../protocol/data/proto/msgType0x210.kt | 160 ++++++++++++++++++ 3 files changed, 281 insertions(+), 12 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt index b1abdecfb..5aefda270 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt @@ -32,6 +32,7 @@ internal class StTroopNumSimplify( @TarsId(1) @JvmField val dwGroupInfoSeq: Long? = null, @TarsId(2) @JvmField val dwGroupFlagExt: Long? = null, @TarsId(3) @JvmField val dwGroupRankSeq: Long? = null, + @TarsId(4) @JvmField val dwGroupInfoExtSeq: Long? = 0L, ) : JceStruct @@ -47,6 +48,7 @@ internal class GetTroopListRespV2( @TarsId(7) @JvmField val vecTroopRank: List? = null, @TarsId(8) @JvmField val vecFavGroup: List? = null, @TarsId(9) @JvmField val vecTroopListExt: List? = null, + @TarsId(10) @JvmField val vecGroupInfoExt: List? = null, ) : JceStruct @@ -87,24 +89,26 @@ internal class StTroopNum( @TarsId(32) @JvmField val udwHLGuildSubType: Long? = null, @TarsId(33) @JvmField val udwCmdUinRingtoneID: Long? = null, @TarsId(34) @JvmField val udwCmdUinFlagEx2: Long? = null, + @TarsId(35) @JvmField val dwGroupFlagExt4: Long? = 0L, + @TarsId(36) @JvmField val dwAppealDeadline: Long? = 0L, + @TarsId(37) @JvmField val dwGroupFlag: Long? = 0L, + @TarsId(38) @JvmField val vecGroupRemark: ByteArray? = null, ) : JceStruct @Serializable internal class StGroupRankInfo( - @TarsId(0) @JvmField val dwGroupCode: Long, - @TarsId(1) @JvmField val groupRankSysFlag: Byte? = null, - @TarsId(2) @JvmField val groupRankUserFlag: Byte? = null, + @TarsId(0) @JvmField val dwGroupCode: Long = 0L, + @TarsId(1) @JvmField val groupRankSysFlag: Byte? = 0, + @TarsId(2) @JvmField val groupRankUserFlag: Byte? = 0, @TarsId(3) @JvmField val vecRankMap: List? = null, - @TarsId(4) @JvmField val dwGroupRankSeq: Long? = null, + @TarsId(4) @JvmField val dwGroupRankSeq: Long? = 0L, @TarsId(5) @JvmField val ownerName: String? = "", @TarsId(6) @JvmField val adminName: String? = "", - @TarsId(7) @JvmField val dwOfficeMode: Long? = null, - @TarsId(9) @JvmField val fuckIssue405: List? = null, // fake + @TarsId(7) @JvmField val dwOfficeMode: Long? = 0L, + @TarsId(8) @JvmField val groupRankUserFlagNew: Byte? = 0, + @TarsId(9) @JvmField val vecRankMapNew: List? = null, ) : JceStruct -@Serializable -internal class FuckIssue405 - @Serializable internal class StFavoriteGroup( @TarsId(0) @JvmField val dwGroupCode: Long, @@ -186,6 +190,8 @@ internal class StTroopMemberInfo( @TarsId(37) @JvmField val dwBigClubFlag: Long? = null, @TarsId(38) @JvmField val dwNameplate: Long? = null, @TarsId(39) @JvmField val vecGroupHonor: ByteArray? = null, + @TarsId(40) @JvmField val vecName: ByteArray? = null, + @TarsId(41) @JvmField val richFlag: Byte? = 0, ) : JceStruct @Serializable diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt index 666566b7d..ab66fb3cd 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt @@ -7,7 +7,7 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -@file:Suppress("SpellCheckingInspection") +@file:Suppress("unused", "SpellCheckingInspection") package net.mamoe.mirai.internal.network.protocol.data.proto @@ -18,6 +18,7 @@ import kotlinx.serialization.protobuf.ProtoType import net.mamoe.mirai.internal.utils.io.ProtoBuf import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY +@Serializable internal class GroupOpenSysMsg : ProtoBuf { @Serializable internal class LightApp( @@ -125,9 +126,35 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(9) @JvmField val action: Int = 0, ) : ProtoBuf + @Serializable + internal class GrayData( + @ProtoNumber(1) @JvmField val allRead: Int = 0, + @ProtoNumber(2) @JvmField val feedId: String = "", + ) : ProtoBuf + + @Serializable + internal class GroupAnnounceTBCInfo( + @ProtoNumber(1) @JvmField val feedsId: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(2) @JvmField val groupId: Long = 0L, + @ProtoNumber(3) @JvmField val action: Int = 0, + ) : ProtoBuf + + @Serializable + internal class GroupAsyncNotify( + @ProtoNumber(1) @JvmField val msgType: Int = 0, + @ProtoNumber(2) @JvmField val msgSeq: Long = 0L, + ) : ProtoBuf + @Serializable internal class GroupInfoChange( @ProtoNumber(1) @JvmField val groupHonorSwitch: Int = 0, + @ProtoNumber(2) @JvmField val groupMemberLevelSwitch: Int = 0, + @ProtoNumber(3) @JvmField val groupFlagext4: Int = 0, + @ProtoNumber(4) @JvmField val appealDeadline: Int = 0, + @ProtoNumber(5) @JvmField val groupFlag: Int = 0, + @ProtoNumber(7) @JvmField val groupFlagext3: Int = 0, + @ProtoNumber(8) @JvmField val groupClassExt: Int = 0, + @ProtoNumber(9) @JvmField val groupInfoExtSeq: Int = 0, ) : ProtoBuf @Serializable @@ -187,6 +214,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(8) @JvmField val joinNums: Int = 0, @ProtoNumber(9) @JvmField val msgPerSetting: PersonalSetting? = null, @ProtoNumber(10) @JvmField val playMode: Int = 0, + @ProtoNumber(11) @JvmField val isJoinWhenStart: Boolean = false, @ProtoNumber(99) @JvmField val mediaType: Int = 0, @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf { @@ -214,6 +242,8 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(5) @JvmField val userdef: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(6) @JvmField val groupType: Int = 0, @ProtoNumber(7) @JvmField val opType: Int = 0, + @ProtoNumber(8) @JvmField val adminUin: Long = 0L, + @ProtoNumber(9) @JvmField val msgWordingInfo: WithDrawWordingInfo? = null, ) : ProtoBuf { @Serializable internal class MessageMeta( @@ -223,6 +253,13 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(4) @JvmField val msgType: Int = 0, @ProtoNumber(5) @JvmField val msgFlag: Int = 0, @ProtoNumber(6) @JvmField val authorUin: Long = 0L, + @ProtoNumber(7) @JvmField val isAnonyMsg: Int = 0, + ) : ProtoBuf + + @Serializable + internal class WithDrawWordingInfo( + @ProtoNumber(1) @JvmField val int32ItemId: Int = 0, + @ProtoNumber(2) @JvmField val itemName: String = "", ) : ProtoBuf } @@ -248,8 +285,8 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(13) @JvmField val serviceType: Int = 0, @ProtoNumber(14) @JvmField val optMsgObjmsgUpdate: NotifyObjmsgUpdate? = null, @ProtoNumber(15) @JvmField val optMsgWerewolfPush: WereWolfPush? = null, - // @SerialId(16) @JvmField val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null, - // @SerialId(17) @JvmField val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null, + //@ProtoNumber(16) @JvmField val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null, + //@ProtoNumber(17) @JvmField val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null, @ProtoNumber(18) @JvmField val optMsgGoldtips: GoldMsgTipsElem? = null, @ProtoNumber(20) @JvmField val optMsgMiniappNotify: MiniAppNotify? = null, @ProtoNumber(21) @JvmField val optUint64SenderUin: Long = 0L, @@ -261,6 +298,14 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(28) @JvmField val optLbsShareChangePlusInfo: LbsShareChangePushInfo? = null, @ProtoNumber(29) @JvmField val optMsgSingPush: SingChangePushInfo? = null, @ProtoNumber(30) @JvmField val optMsgGroupInfoChange: GroupInfoChange? = null, + @ProtoNumber(31) @JvmField val optGroupAnnounceTbcInfo: GroupAnnounceTBCInfo? = null, + @ProtoNumber(32) @JvmField val optQqVedioGamePushInfo: QQVedioGamePushInfo? = null, + @ProtoNumber(33) @JvmField val optQqGroupDigestMsg: QQGroupDigestMsg? = null, + @ProtoNumber(34) @JvmField val optStudyRoomMemberMsg: StudyRoomMemberChangePush? = null, + @ProtoNumber(35) @JvmField val optQqLiveNotify: QQVaLiveNotifyMsg? = null, + @ProtoNumber(36) @JvmField val optGroupAsyncNotidy: GroupAsyncNotify? = null, + @ProtoNumber(37) @JvmField val optUint64GroupCurMsgSeq: Long = 0L, + @ProtoNumber(38) @JvmField val optGroupDigestMsgSummary: QQGroupDigestMsgSummary? = null ) : ProtoBuf @Serializable @@ -270,6 +315,56 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf + @Serializable + internal class QQGroupDigestMsg( + @ProtoNumber(1) @JvmField val groupCode: Long = 0L, + @ProtoNumber(2) @JvmField val msgSeq: Int = 0, + @ProtoNumber(3) @JvmField val msgRandom: Int = 0, + @ProtoNumber(4) @JvmField val opType: Int = 0, + @ProtoNumber(5) @JvmField val msgSender: Long = 0L, + @ProtoNumber(6) @JvmField val digestOper: Long = 0L, + @ProtoNumber(7) @JvmField val opTime: Int = 0, + @ProtoNumber(8) @JvmField val lastestMsgSeq: Int = 0, + @ProtoNumber(9) @JvmField val operNick: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(10) @JvmField val senderNick: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(11) @JvmField val extInfo: Int = 0, + ) : ProtoBuf + + @Serializable + internal class QQGroupDigestMsgSummary( + @ProtoNumber(1) @JvmField val digestOper: Long = 0L, + @ProtoNumber(2) @JvmField val opType: Int = 0, + @ProtoNumber(3) @JvmField val opTime: Int = 0, + @ProtoNumber(4) @JvmField val digestNick: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(5) @JvmField val succCnt: Int = 0, + @ProtoNumber(6) @JvmField val summaryInfo: List = emptyList(), + ) : ProtoBuf + + @Serializable + internal class QQGroupDigestSummaryInfo( + @ProtoNumber(1) @JvmField val msgSeq: Int = 0, + @ProtoNumber(2) @JvmField val msgRandom: Int = 0, + @ProtoNumber(3) @JvmField val errorCode: Int = 0, + ) : ProtoBuf + + @Serializable + internal class QQVaLiveNotifyMsg( + @ProtoNumber(1) @JvmField val uid: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(2) @JvmField val notifyType: Int = 0, + @ProtoNumber(3) @JvmField val ext1: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(4) @JvmField val ext2: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(5) @JvmField val ext3: ByteArray = EMPTY_BYTE_ARRAY, + ) : ProtoBuf + + @Serializable + internal class QQVedioGamePushInfo( + @ProtoNumber(1) @JvmField val msgType: Int = 0, + @ProtoNumber(2) @JvmField val groupCode: Long = 0L, + @ProtoNumber(3) @JvmField val operUin: Long = 0L, + @ProtoNumber(4) @JvmField val versionCtrl: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(5) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, + ) : ProtoBuf + @Serializable internal class RedGrayTipsInfo( @ProtoNumber(1) @JvmField val optUint32ShowLastest: Int = 0, @@ -291,6 +386,8 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(17) @JvmField val idiomSeq: Int = 0, @ProtoNumber(18) @JvmField val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(20) @JvmField val subchannel: Int = 0, + @ProtoNumber(21) @JvmField val poemRule: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -318,6 +415,11 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(6) @JvmField val joinNums: Int = 0, ) : ProtoBuf + @Serializable + internal class StudyRoomMemberChangePush( + @ProtoNumber(1) @JvmField val memberCount: Int = 0 + ) : ProtoBuf + @Serializable internal class TemplParam( @ProtoNumber(1) @JvmField val name: String = "", @@ -350,6 +452,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(4) @JvmField val operUin: Long = 0L, @ProtoNumber(5) @JvmField val grayTips: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(6) @JvmField val joinNums: Int = 0, + @ProtoNumber(7) @JvmField val joinState: Int = 0, @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/msgType0x210.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/msgType0x210.kt index f35d3d29a..3243024e5 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/msgType0x210.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/msgType0x210.kt @@ -133,6 +133,21 @@ internal class Submsgtype0x111 { @ProtoNumber(2) @JvmField val subSource: Int = 0, ) : ProtoBuf + @Serializable + internal class Color( + @ProtoNumber(1) @JvmField val r: Int = 0, + @ProtoNumber(2) @JvmField val g: Int = 0, + @ProtoNumber(3) @JvmField val b: Int = 0, + ) : ProtoBuf + + @Serializable + internal class Label( + @ProtoNumber(1) @JvmField val name: ByteArray = EMPTY_BYTE_ARRAY, + @ProtoNumber(2) @JvmField val textColor: Color? = null, + @ProtoNumber(3) @JvmField val edgingColor: Color? = null, + @ProtoNumber(4) @JvmField val labelType: Int = 0, + ) : ProtoBuf + @Serializable internal class MayKnowPerson( @ProtoNumber(1) @JvmField val uin: Long = 0L, @@ -153,6 +168,7 @@ internal class Submsgtype0x111 { @ProtoNumber(16) @JvmField val gender: Int = 0, @ProtoNumber(17) @JvmField val mobileName: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(18) @JvmField val token: String = "", + @ProtoNumber(19) @JvmField val msgLabels: List