update parsing of many packets

This commit is contained in:
wish
2023-11-19 00:35:22 +11:00
parent 734b60bee1
commit fc57d63689
32 changed files with 146 additions and 171 deletions

View File

@@ -1,18 +1,16 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgSysHideClient represents the MSG_SYS_HIDE_CLIENT
type MsgSysHideClient struct {
Hide bool
Unk0 uint16 // Hardcoded 0 in binary
Unk1 uint8 // Hardcoded 0 in binary
}
// Opcode returns the ID associated with this packet type.
@@ -23,8 +21,9 @@ func (m *MsgSysHideClient) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgSysHideClient) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.Hide = bf.ReadBool()
m.Unk0 = bf.ReadUint16()
m.Unk1 = bf.ReadUint8()
bf.ReadUint8() // Zeroed
bf.ReadUint8() // Zeroed
bf.ReadUint8() // Zeroed
return nil
}