mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
update parsing of many packets
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfOprMember represents the MSG_MHF_OPR_MEMBER
|
||||
type MsgMhfOprMember struct {
|
||||
AckHandle uint32
|
||||
Blacklist bool
|
||||
Operation bool
|
||||
Unk uint16
|
||||
CharID uint32
|
||||
AckHandle uint32
|
||||
Blacklist bool
|
||||
Operation bool
|
||||
Unk uint16
|
||||
CharIDs []uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,12 +24,15 @@ func (m *MsgMhfOprMember) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfOprMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Blacklist = bf.ReadBool()
|
||||
m.Operation = bf.ReadBool()
|
||||
m.Unk = bf.ReadUint16()
|
||||
m.CharID = bf.ReadUint32()
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Blacklist = bf.ReadBool()
|
||||
m.Operation = bf.ReadBool()
|
||||
bf.ReadUint8()
|
||||
chars := int(bf.ReadUint8())
|
||||
for i := 0; i < chars; i++ {
|
||||
m.CharIDs = append(m.CharIDs, bf.ReadUint32())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
Reference in New Issue
Block a user