This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpacket_pull_md_result_autogen.go
81 lines (77 loc) · 1.72 KB
/
packet_pull_md_result_autogen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// This file is automatically generated. DO NOT MODIFY!
package lumina
func (*PullMdResultPacket) getType() PacketType {
return PKT_PULL_MD_RESULT
}
func (this *PullMdResultPacket) readFrom(r Reader) (err error) {
// Field this.Codes
// Slice []OpResult
var v1 uint32
if v1, err = readUint32(r); err != nil {
return
}
this.Codes = make([]OpResult, v1)
for v2 := uint32(0); v2 < v1; v2++ {
// Field this.Codes[v2]
// Basic int32
// Typed OpResult
var v3 int32
if v3, err = readInt32(r); err != nil {
return
}
this.Codes[v2] = OpResult(v3)
}
// Field this.Results
// Slice []FuncInfoAndFrequency
var v4 uint32
if v4, err = readUint32(r); err != nil {
return
}
this.Results = make([]FuncInfoAndFrequency, v4)
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.Results[v5]
// Struct FuncInfoAndFrequency
if err = this.Results[v5].readFrom(r); err != nil {
return
}
}
return
}
func (this *PullMdResultPacket) writeTo(w Writer) (err error) {
// Field this.Codes
// Slice []OpResult
if len(this.Codes) > 0x7FFFFFFF {
err = errTooLong
return
}
var v1 = uint32(len(this.Codes))
if err = writeUint32(w, v1); err != nil {
return
}
for v2 := uint32(0); v2 < v1; v2++ {
// Field this.Codes[v2]
// Basic int32
// Typed OpResult
if err = writeInt32(w, int32(this.Codes[v2])); err != nil {
return
}
}
// Field this.Results
// Slice []FuncInfoAndFrequency
if len(this.Results) > 0x7FFFFFFF {
err = errTooLong
return
}
var v4 = uint32(len(this.Results))
if err = writeUint32(w, v4); err != nil {
return
}
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.Results[v5]
// Struct FuncInfoAndFrequency
if err = this.Results[v5].writeTo(w); err != nil {
return
}
}
return
}