public static List <string> GetGroupMemberlist(byte[] BytesIn) { List <string> list = new List <string>(); BytesIn = BytesIn.Skip(4).ToArray(); JceStruct.StartDecode(BytesIn); if (JceStruct.DicSimpleList.Count > 0) //取SimpleList { var hex = JceStruct.DicSimpleList[0].ElementAt(0).Value; JceStruct.StartDecode(API.HexStrToByteArray(hex)); if (JceStruct.DicMAP.Count > 0) //取Map { hex = JceStruct.DicMAP[0].ElementAt(0).Value.Item2; JceStruct.StartDecode(API.HexStrToByteArray(hex)); if (JceStruct.DicList.Count > 0) //取List { for (var i = 0; i < JceStruct.DicList.Count; i++) { var info = JceStruct.DicList[i].ElementAt(0).Value.Trim().Split('/'); if (info.Count() < 42) { break; } list.Add(info[0] + "(" + info[4] + ")"); } SDK.GetValue(list); } } } return(list); }
public static void ReplyConfigPushSvc(byte[] BytesIn, int ssoseq) { JceStruct.StartDecode(BytesIn); if (JceStruct.DicSimpleList.Count > 0) { var Hex = JceStruct.DicSimpleList[0].ElementAt(0).Value; JceStruct.StartDecode(API.HexStrToByteArray(Hex)); if (JceStruct.DicSimpleList.Count > 0) { Hex = JceStruct.DicSimpleList[0].ElementAt(0).Value; JceStruct.StartDecode(API.HexStrToByteArray(Hex)); byte P1 = new byte(); long P2 = 0; if (JceStruct.DicByte.Count > 0) { byte.TryParse(JceStruct.DicByte[0].ElementAt(0).Value, out P1); if (P1 != 2) { return; } } if (JceStruct.DicInt.Count > 0) { P2 = int.Parse(JceStruct.DicInt[0].ElementAt(0).Value); } else if (JceStruct.DicLong.Count > 0) { P2 = long.Parse(JceStruct.DicLong[0].ElementAt(0).Value); } var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0); bytes = bytes.Concat(JceStruct.writeByte(P1, 1)).ToArray(); bytes = bytes.Concat(JceStruct.writeLong(P2, 2)).ToArray(); var dic = new Dictionary <object, object>() { { "PushResp", bytes } }; bytes = JceStruct.writeMap(dic, 1); Debug.Print("ReplyConfigPushSvc:" + bytes.Length.ToString() + "\r\n" + BitConverter.ToString(bytes).Replace("-", " ")); bytes = JceStructSDK.Pack_HeadJce(API.QQ.mRequestID, "QQService.ConfigPushSvc.MainServant", "PushResp", bytes); bytes = API.PackCmdHeader("ConfigPushSvc.PushResp", bytes); API.TClient.SendData(API.PackAllHeader(bytes)); } } }
public static void GetSimpleInfo(byte[] BytesIn) { BytesIn = BytesIn.Skip(4).ToArray(); JceStruct.StartDecode(BytesIn); if (JceStruct.DicSimpleList.Count > 0) { var hex = JceStruct.DicSimpleList[0].ElementAt(0).Value; JceStruct.StartDecode(API.HexStrToByteArray(hex)); if (JceStruct.DicMAP.Count > 0) { hex = JceStruct.DicMAP[0].ElementAt(0).Value.Item2; JceStruct.StartDecode(API.HexStrToByteArray(hex)); if (JceStruct.DicList.Count > 0) { var info = JceStruct.DicList[0].ElementAt(0).Value.Trim().Split('/'); API.NickName = info[4]; List <string> list = new List <string> { info[0], info[4], info[3], (info[5] == "0")?"女":"男", info[12], info[14] }; SDK.GetValue(list); } } } }