-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriterto.go
More file actions
63 lines (51 loc) · 1.06 KB
/
Copy pathwriterto.go
File metadata and controls
63 lines (51 loc) · 1.06 KB
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
package showgone
import "io"
func (p *Pokemon) WriteTo(w io.Writer) (int64, error) {
var wrote int64
n, err := p.fieldSpecies(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldAbility(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldLevel(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldShiny(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldHappiness(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldVs(w, 'I')
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldVs(w, 'E')
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldNature(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
n, err = p.fieldMoves(w)
wrote += int64(n)
if err != nil {
return wrote, err
}
return wrote, nil
}