Add MsgMhfAcquireCafeItem size parser

This commit is contained in:
Andrew Gutekanst
2020-02-23 20:15:30 -05:00
parent 1e33ed84c6
commit 52107be3ff

View File

@@ -6,7 +6,16 @@ import (
) )
// MsgMhfAcquireCafeItem represents the MSG_MHF_ACQUIRE_CAFE_ITEM // 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. // Opcode returns the ID associated with this packet type.
func (m *MsgMhfAcquireCafeItem) Opcode() network.PacketID { func (m *MsgMhfAcquireCafeItem) Opcode() network.PacketID {
@@ -15,7 +24,13 @@ func (m *MsgMhfAcquireCafeItem) Opcode() network.PacketID {
// Parse parses the packet from binary // Parse parses the packet from binary
func (m *MsgMhfAcquireCafeItem) Parse(bf *byteframe.ByteFrame) error { 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. // Build builds a binary packet from the current data.