Merge pull request #97 from ZeruLight/fix/rework-distributions

fix/rework-distributions
This commit is contained in:
wish
2023-11-11 19:42:08 +11:00
committed by GitHub
4 changed files with 178 additions and 131 deletions

View File

@@ -10,7 +10,7 @@ import (
// MsgMhfEnumerateDistItem represents the MSG_MHF_ENUMERATE_DIST_ITEM
type MsgMhfEnumerateDistItem struct {
AckHandle uint32
Unk0 uint8
DistType uint8
Unk1 uint8
Unk2 uint16
Unk3 []byte
@@ -24,9 +24,9 @@ func (m *MsgMhfEnumerateDistItem) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfEnumerateDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.DistType = bf.ReadUint8()
m.Unk1 = bf.ReadUint8()
m.Unk2 = bf.ReadUint16()
m.Unk2 = bf.ReadUint16() // Maximum? Hardcoded to 256
m.Unk3 = bf.ReadBytes(uint(bf.ReadUint8()))
return nil
}