diff --git a/binary/jce/gen/structs_parser_tmp.go b/binary/jce/gen/structs_parser_tmp.go index 26ccd631..f20901fa 100644 --- a/binary/jce/gen/structs_parser_tmp.go +++ b/binary/jce/gen/structs_parser_tmp.go @@ -68,16 +68,16 @@ func writeObject(w io.Writer, v reflect.Value, tag byte, name string) { w.Write([]byte(fmt.Sprintf("\tw.WriteInt64(int64(pkt.%s), %d)\n", name, tag))) case reflect.String: w.Write([]byte(fmt.Sprintf("\tw.WriteString(pkt.%s, %d)\n", name, tag))) + case reflect.Interface, reflect.Ptr: + w.Write([]byte(fmt.Sprintf("\tw.writeHead(10, %d)\n", tag))) + w.Write([]byte(fmt.Sprintf("\tw.buf.Write(pkt.%s.ToBytes())\n", name))) + w.Write([]byte("\tw.writeHead(11, 0)\n")) default: switch v.Interface().(type) { case float32: w.Write([]byte(fmt.Sprintf("\tw.WriteFloat32(pkt.%s, %d)\n", name, tag))) case float64: w.Write([]byte(fmt.Sprintf("\tw.WriteFloat64(pkt.%s, %d)\n", name, tag))) - case IJceStruct: - w.Write([]byte(fmt.Sprintf("\tw.writeHead(10, %d)\n", tag))) - w.Write([]byte(fmt.Sprintf("\tw.buf.Write(pkt.%s.ToBytes())\n", name))) - w.Write([]byte("\tw.writeHead(11, 0)\n")) } } } diff --git a/binary/jce/structs_tobytes.go b/binary/jce/structs_tobytes.go index 1e042498..e03ef5f7 100644 --- a/binary/jce/structs_tobytes.go +++ b/binary/jce/structs_tobytes.go @@ -229,6 +229,12 @@ func (pkt *SvcRespRegister) ToBytes() []byte { func (pkt *SvcReqRegisterNew) ToBytes() []byte { w := NewJceWriter() w.WriteInt64(pkt.RequestOptional, 0) + w.writeHead(10, 1) + w.buf.Write(pkt.C2CMsg.ToBytes()) + w.writeHead(11, 0) + w.writeHead(10, 2) + w.buf.Write(pkt.GroupMsg.ToBytes()) + w.writeHead(11, 0) w.WriteByte(pkt.DisGroupMsgFilter, 14) w.WriteByte(pkt.GroupMask, 15) w.WriteInt64(pkt.EndSeq, 16)