Make changed parsers size-accurate

This commit is contained in:
Andrew Gutekanst
2020-03-03 02:32:00 -05:00
parent e90cc176ec
commit d300098838
19 changed files with 141 additions and 28 deletions

View File

@@ -8,6 +8,9 @@ import (
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT
type MsgMhfEnumerateGuacot struct {
AckHandle uint32
Unk0 uint16 // Hardcoded 0 in binary
Unk1 uint16 // Hardcoded 0 in binary
Unk2 uint16 // Hardcoded 0 in binary
}
// Opcode returns the ID associated with this packet type.
@@ -18,6 +21,9 @@ func (m *MsgMhfEnumerateGuacot) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint16()
m.Unk1 = bf.ReadUint16()
m.Unk2 = bf.ReadUint16()
return nil
}