handle alliance enumeration

This commit is contained in:
wish
2022-09-30 23:05:10 +10:00
parent ca9f2de457
commit 40a86364d9
3 changed files with 146 additions and 34 deletions

View File

@@ -1,15 +1,19 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfInfoJoint represents the MSG_MHF_INFO_JOINT
type MsgMhfInfoJoint struct{}
type MsgMhfInfoJoint struct {
AckHandle uint32
AllianceID uint32
Unk uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfInfoJoint) Opcode() network.PacketID {
@@ -18,7 +22,10 @@ func (m *MsgMhfInfoJoint) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfInfoJoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
return errors.New("NOT IMPLEMENTED")
m.AckHandle = bf.ReadUint32()
m.AllianceID = bf.ReadUint32()
m.Unk = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.