From 52107be3ff769d94803301618812c28f2e09bc9c Mon Sep 17 00:00:00 2001 From: Andrew Gutekanst Date: Sun, 23 Feb 2020 20:15:30 -0500 Subject: [PATCH] Add MsgMhfAcquireCafeItem size parser --- .../mhfpacket/msg_mhf_acquire_cafe_item.go | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/network/mhfpacket/msg_mhf_acquire_cafe_item.go b/network/mhfpacket/msg_mhf_acquire_cafe_item.go index 3087e1742..f3bd26872 100644 --- a/network/mhfpacket/msg_mhf_acquire_cafe_item.go +++ b/network/mhfpacket/msg_mhf_acquire_cafe_item.go @@ -6,7 +6,16 @@ import ( ) // MsgMhfAcquireCafeItem represents the MSG_MHF_ACQUIRE_CAFE_ITEM -type MsgMhfAcquireCafeItem struct{} +type MsgMhfAcquireCafeItem struct { + AckHandle uint32 + + // Valid sizes, not sure if [un]signed. + Unk0 uint16 + Unk1 uint16 + Unk2 uint16 + Unk3 uint32 + Unk4 uint16 +} // Opcode returns the ID associated with this packet type. func (m *MsgMhfAcquireCafeItem) Opcode() network.PacketID { @@ -15,10 +24,16 @@ func (m *MsgMhfAcquireCafeItem) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireCafeItem) Parse(bf *byteframe.ByteFrame) error { - panic("Not implemented") + m.AckHandle = bf.ReadUint32() + m.Unk0 = bf.ReadUint16() + m.Unk1 = bf.ReadUint16() + m.Unk2 = bf.ReadUint16() + m.Unk3 = bf.ReadUint32() + m.Unk4 = bf.ReadUint16() + return nil } // Build builds a binary packet from the current data. func (m *MsgMhfAcquireCafeItem) Build(bf *byteframe.ByteFrame) error { panic("Not implemented") -} \ No newline at end of file +}