mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
moved crypto bin8 out of entrance server removed unused clientctx missed import fix accidental commit and rename ack_helpers
40 lines
893 B
Go
40 lines
893 B
Go
package mhfpacket
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"erupe-ce/network"
|
|
"erupe-ce/utils/byteframe"
|
|
)
|
|
|
|
// MsgMhfOprMember represents the MSG_MHF_OPR_MEMBER
|
|
type MsgMhfOprMember struct {
|
|
AckHandle uint32
|
|
Blacklist bool
|
|
Operation bool
|
|
CharIDs []uint32
|
|
}
|
|
|
|
// Opcode returns the ID associated with this packet type.
|
|
func (m *MsgMhfOprMember) Opcode() network.PacketID {
|
|
return network.MSG_MHF_OPR_MEMBER
|
|
}
|
|
|
|
// Parse parses the packet from binary
|
|
func (m *MsgMhfOprMember) Parse(bf *byteframe.ByteFrame) error {
|
|
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.
|
|
func (m *MsgMhfOprMember) Build(bf *byteframe.ByteFrame) error {
|
|
return errors.New("NOT IMPLEMENTED")
|
|
}
|