Initial chat prototype

This commit is contained in:
Andrew Gutekanst
2020-01-19 12:52:57 -05:00
parent e6d7b7b9c2
commit fa608fa555
73 changed files with 1646 additions and 714 deletions

View File

@@ -6,7 +6,12 @@ import (
)
// MsgMhfReadBeatLevel represents the MSG_MHF_READ_BEAT_LEVEL
type MsgMhfReadBeatLevel struct{}
type MsgMhfReadBeatLevel struct {
AckHandle uint32
Unk0 uint32
ValidIDCount uint32 // Valid entries in the array
IDs [16]uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfReadBeatLevel) Opcode() network.PacketID {
@@ -15,10 +20,19 @@ func (m *MsgMhfReadBeatLevel) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfReadBeatLevel) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
// I assume this used to be dynamic, but as of the last JP client version, all of this data is hard-coded literals.
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint32() // Always 1
m.ValidIDCount = bf.ReadUint32() // Always 4
// Always 0x74, 0x6B, 0x02, 0x24 followed by 12 zero values.
for i := 0; i < len(m.IDs); i++ {
m.IDs[i] = bf.ReadUint32()
}
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfReadBeatLevel) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}