mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
moved crypto bin8 out of entrance server removed unused clientctx missed import fix accidental commit and rename ack_helpers
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package mhfpacket
|
|
|
|
import (
|
|
"errors"
|
|
|
|
_config "erupe-ce/config"
|
|
"erupe-ce/network"
|
|
"erupe-ce/utils/byteframe"
|
|
)
|
|
|
|
// MsgMhfUpdateMyhouseInfo represents the MSG_MHF_UPDATE_MYHOUSE_INFO
|
|
type MsgMhfUpdateMyhouseInfo struct {
|
|
AckHandle uint32
|
|
Data []byte
|
|
}
|
|
|
|
// Opcode returns the ID associated with this packet type.
|
|
func (m *MsgMhfUpdateMyhouseInfo) Opcode() network.PacketID {
|
|
return network.MSG_MHF_UPDATE_MYHOUSE_INFO
|
|
}
|
|
|
|
// Parse parses the packet from binary
|
|
func (m *MsgMhfUpdateMyhouseInfo) Parse(bf *byteframe.ByteFrame) error {
|
|
m.AckHandle = bf.ReadUint32()
|
|
if _config.ErupeConfig.ClientID >= _config.G10 {
|
|
m.Data = bf.ReadBytes(362)
|
|
} else if _config.ErupeConfig.ClientID >= _config.GG {
|
|
m.Data = bf.ReadBytes(338)
|
|
} else if _config.ErupeConfig.ClientID >= _config.F5 {
|
|
// G1 is a guess
|
|
m.Data = bf.ReadBytes(314)
|
|
} else {
|
|
m.Data = bf.ReadBytes(290)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Build builds a binary packet from the current data.
|
|
func (m *MsgMhfUpdateMyhouseInfo) Build(bf *byteframe.ByteFrame) error {
|
|
return errors.New("NOT IMPLEMENTED")
|
|
}
|