rewrite Earth packet handlers

This commit is contained in:
wish
2023-06-10 23:09:50 +10:00
parent d16acbc824
commit fbecbfa571
4 changed files with 240 additions and 155 deletions

View File

@@ -11,8 +11,13 @@ import (
// MsgMhfGetGemInfo represents the MSG_MHF_GET_GEM_INFO
type MsgMhfGetGemInfo struct {
AckHandle uint32
Unk uint32
Unk1 []byte
Unk0 uint32
Unk1 uint32
Unk2 int32
Unk3 int32
Unk4 int32
Unk5 int32
Unk6 int32
}
// Opcode returns the ID associated with this packet type.
@@ -23,8 +28,13 @@ func (m *MsgMhfGetGemInfo) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfGetGemInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Unk = bf.ReadUint32()
m.Unk1 = bf.ReadBytes(24)
m.Unk0 = bf.ReadUint32()
m.Unk1 = bf.ReadUint32()
m.Unk2 = bf.ReadInt32()
m.Unk3 = bf.ReadInt32()
m.Unk4 = bf.ReadInt32()
m.Unk5 = bf.ReadInt32()
m.Unk6 = bf.ReadInt32()
return nil
}