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
/
packet_get_func_histories_result_autogen.go
295 lines (285 loc) · 6.19 KB
/
packet_get_func_histories_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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
// This file is automatically generated. DO NOT MODIFY!
package lumina
func (this *FuncHistoryData) readFrom(r Reader) (err error) {
// Field this.Name
// Basic string
if this.Name, err = readString(r); err != nil {
return
}
// Field this.Metadata
// Slice []byte
var v1 uint32
if v1, err = readUint32(r); err != nil {
return
}
this.Metadata = make([]byte, v1)
if err = readBytes(r, this.Metadata); err != nil {
return
}
return
}
func (this *FuncHistoryData) writeTo(w Writer) (err error) {
// Field this.Name
// Basic string
if err = writeString(w, this.Name); err != nil {
return
}
// Field this.Metadata
// Slice []byte
if len(this.Metadata) > 0x7FFFFFFF {
err = errTooLong
return
}
var v1 = uint32(len(this.Metadata))
if err = writeUint32(w, v1); err != nil {
return
}
if err = writeBytes(w, this.Metadata); err != nil {
return
}
return
}
func (this *FuncHistoryBase) readFrom(r Reader) (err error) {
// Field this.Unknown1
// Basic uint64
if this.Unknown1, err = readUint64(r); err != nil {
return
}
// Field this.Unknown2
// Basic uint64
if this.Unknown2, err = readUint64(r); err != nil {
return
}
// Field this.Data
// Struct FuncHistoryData
if err = this.Data.readFrom(r); err != nil {
return
}
return
}
func (this *FuncHistoryBase) writeTo(w Writer) (err error) {
// Field this.Unknown1
// Basic uint64
if err = writeUint64(w, this.Unknown1); err != nil {
return
}
// Field this.Unknown2
// Basic uint64
if err = writeUint64(w, this.Unknown2); err != nil {
return
}
// Field this.Data
// Struct FuncHistoryData
if err = this.Data.writeTo(w); err != nil {
return
}
return
}
func (this *FuncHistory) readFrom(r Reader) (err error) {
// Field this.FuncHistoryBase
// Struct FuncHistoryBase
if err = this.FuncHistoryBase.readFrom(r); err != nil {
return
}
// Field this.Timestamp
// Basic uint64
// Typed UtcTimestamp
var v1 uint64
if v1, err = readUint64(r); err != nil {
return
}
this.Timestamp = UtcTimestamp(v1)
// Field this.AuthorIdx
// Basic uint32
if this.AuthorIdx, err = readUint32(r); err != nil {
return
}
// Field this.IdbPathIdx
// Basic uint32
if this.IdbPathIdx, err = readUint32(r); err != nil {
return
}
return
}
func (this *FuncHistory) writeTo(w Writer) (err error) {
// Field this.FuncHistoryBase
// Struct FuncHistoryBase
if err = this.FuncHistoryBase.writeTo(w); err != nil {
return
}
// Field this.Timestamp
// Basic uint64
// Typed UtcTimestamp
if err = writeUint64(w, uint64(this.Timestamp)); err != nil {
return
}
// Field this.AuthorIdx
// Basic uint32
if err = writeUint32(w, this.AuthorIdx); err != nil {
return
}
// Field this.IdbPathIdx
// Basic uint32
if err = writeUint32(w, this.IdbPathIdx); err != nil {
return
}
return
}
func (*GetFuncHistoriesResultPacket) getType() PacketType {
return PKT_GET_FUNC_HISTORIES_RESULT
}
func (this *GetFuncHistoriesResultPacket) 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.Funcs
// Slice []FuncHistories
var v4 uint32
if v4, err = readUint32(r); err != nil {
return
}
this.Funcs = make([]FuncHistories, v4)
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.Funcs[v5]
// Slice []FuncHistory
var v6 uint32
if v6, err = readUint32(r); err != nil {
return
}
this.Funcs[v5] = make([]FuncHistory, v6)
for v7 := uint32(0); v7 < v6; v7++ {
// Field this.Funcs[v5][v7]
// Struct FuncHistory
if err = this.Funcs[v5][v7].readFrom(r); err != nil {
return
}
}
}
// Field this.Authors
// Slice []string
var v8 uint32
if v8, err = readUint32(r); err != nil {
return
}
this.Authors = make([]string, v8)
for v9 := uint32(0); v9 < v8; v9++ {
// Field this.Authors[v9]
// Basic string
if this.Authors[v9], err = readString(r); err != nil {
return
}
}
// Field this.IdbPaths
// Slice []string
var v10 uint32
if v10, err = readUint32(r); err != nil {
return
}
this.IdbPaths = make([]string, v10)
for v11 := uint32(0); v11 < v10; v11++ {
// Field this.IdbPaths[v11]
// Basic string
if this.IdbPaths[v11], err = readString(r); err != nil {
return
}
}
return
}
func (this *GetFuncHistoriesResultPacket) 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.Funcs
// Slice []FuncHistories
if len(this.Funcs) > 0x7FFFFFFF {
err = errTooLong
return
}
var v4 = uint32(len(this.Funcs))
if err = writeUint32(w, v4); err != nil {
return
}
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.Funcs[v5]
// Slice []FuncHistory
if len(this.Funcs[v5]) > 0x7FFFFFFF {
err = errTooLong
return
}
var v6 = uint32(len(this.Funcs[v5]))
if err = writeUint32(w, v6); err != nil {
return
}
for v7 := uint32(0); v7 < v6; v7++ {
// Field this.Funcs[v5][v7]
// Struct FuncHistory
if err = this.Funcs[v5][v7].writeTo(w); err != nil {
return
}
}
}
// Field this.Authors
// Slice []string
if len(this.Authors) > 0x7FFFFFFF {
err = errTooLong
return
}
var v8 = uint32(len(this.Authors))
if err = writeUint32(w, v8); err != nil {
return
}
for v9 := uint32(0); v9 < v8; v9++ {
// Field this.Authors[v9]
// Basic string
if err = writeString(w, this.Authors[v9]); err != nil {
return
}
}
// Field this.IdbPaths
// Slice []string
if len(this.IdbPaths) > 0x7FFFFFFF {
err = errTooLong
return
}
var v10 = uint32(len(this.IdbPaths))
if err = writeUint32(w, v10); err != nil {
return
}
for v11 := uint32(0); v11 < v10; v11++ {
// Field this.IdbPaths[v11]
// Basic string
if err = writeString(w, this.IdbPaths[v11]); err != nil {
return
}
}
return
}