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,7 +8,8 @@ import (
// MsgMhfUpdateCafepoint represents the MSG_MHF_UPDATE_CAFEPOINT
type MsgMhfUpdateCafepoint struct {
AckHandle uint32
Unk0 uint32
Unk0 uint16 // Hardcoded 0 in binary
Unk1 uint16 // Hardcoded 0 in binary
}
// Opcode returns the ID associated with this packet type.
@@ -19,7 +20,8 @@ func (m *MsgMhfUpdateCafepoint) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfUpdateCafepoint) Parse(bf *byteframe.ByteFrame) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint32()
m.Unk0 = bf.ReadUint16()
m.Unk1 = bf.ReadUint16()
return nil
}