fix Enumerate/UpdateGuacot

This commit is contained in:
wish
2023-12-04 22:06:43 +11:00
parent 4844acee9c
commit 7717f2f12a
4 changed files with 29 additions and 40 deletions

View File

@@ -9,8 +9,7 @@ import (
type Goocoo struct {
Index uint32
Data1 []uint16
Data2 []uint32
Data []byte
Name []byte
}
@@ -34,12 +33,7 @@ func (m *MsgMhfUpdateGuacot) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clien
var temp Goocoo
for i := 0; i < int(m.EntryCount); i++ {
temp.Index = bf.ReadUint32()
for j := 0; j < 22; j++ {
temp.Data1 = append(temp.Data1, bf.ReadUint16())
}
for j := 0; j < 2; j++ {
temp.Data2 = append(temp.Data2, bf.ReadUint32())
}
temp.Data = bf.ReadBytes(52)
temp.Name = bf.ReadBytes(uint(bf.ReadUint8()))
m.Goocoos = append(m.Goocoos, temp)
}