This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
群成员列表
Mr.喜 edited this page Aug 17, 2020
·
1 revision
- 群成员列表数量
- 第一个群成员信息的字节长度(这个就不用再加它的字节长度了)
- 第一个成员的信息,可参照前一页方法,是一样的
- 第二个……
MemoryStream streamMain = new MemoryStream();
BinaryWriter binaryWriterMain = new BinaryWriter(streamMain);
JArray memberls = JArray.Parse(ret["MemberList"].ToString());
BinaryWriterExpand.Write_Ex(binaryWriterMain, memberls.Count);
foreach (var item in memberls)
{
MemoryStream stream = new MemoryStream();
BinaryWriter binaryWriter = new BinaryWriter(stream);
BinaryWriterExpand.Write_Ex(binaryWriter, groupId);
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt64(item["MemberUin"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, item["NickName"].ToString());
BinaryWriterExpand.Write_Ex(binaryWriter, item["GroupCard"].ToString());
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt32(item["Gender"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt32(item["Age"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, "unkown");
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt32(item["JoinTime"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt32(item["LastSpeakTime"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, $"头衔{item["MemberLevel"]}级");
BinaryWriterExpand.Write_Ex(binaryWriter, Convert.ToInt32(item["GroupAdmin"].ToString()));
BinaryWriterExpand.Write_Ex(binaryWriter, 0);
BinaryWriterExpand.Write_Ex(binaryWriter, item["SpecialTitle"].ToString());
BinaryWriterExpand.Write_Ex(binaryWriter, 2051193600);
BinaryWriterExpand.Write_Ex(binaryWriter, 1);
BinaryWriterExpand.Write_Ex(binaryWriterMain, (short)stream.Length);
binaryWriterMain.Write(stream.ToArray());
}
return Marshal.StringToHGlobalAnsi(Convert.ToBase64String(streamMain.ToArray()));