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

@@ -7,7 +7,9 @@ import (
// MsgMhfAddAchievement represents the MSG_MHF_ADD_ACHIEVEMENT
type MsgMhfAddAchievement struct {
Unk0 []byte
Unk0 uint8
Unk1 uint16
Unk2 uint16
}
// Opcode returns the ID associated with this packet type.
@@ -17,7 +19,9 @@ func (m *MsgMhfAddAchievement) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAddAchievement) Parse(bf *byteframe.ByteFrame) error {
m.Unk0 = bf.ReadBytes(5)
m.Unk0 = bf.ReadUint8()
m.Unk1 = bf.ReadUint16()
m.Unk2 = bf.ReadUint16()
// doesn't expect a response
return nil
}