mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 07:25:03 +01:00
fix raviente announcements
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"
|
||||
)
|
||||
|
||||
// MsgMhfAnnounce represents the MSG_MHF_ANNOUNCE
|
||||
type MsgMhfAnnounce struct {
|
||||
AckHandle uint32
|
||||
IPAddress uint32
|
||||
Port uint16
|
||||
StageID []byte
|
||||
Type uint8
|
||||
AckHandle uint32
|
||||
IPAddress uint32
|
||||
Port uint16
|
||||
StageID []byte
|
||||
Type uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,18 +24,14 @@ func (m *MsgMhfAnnounce) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAnnounce) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.IPAddress = bf.ReadUint32()
|
||||
m.Port = bf.ReadUint16()
|
||||
_ = bf.ReadUint8()
|
||||
_ = bf.ReadUint16()
|
||||
m.StageID = bf.ReadNullTerminatedBytes()
|
||||
for {
|
||||
if bf.ReadUint8() != 0 {
|
||||
m.Type = bf.ReadUint8()
|
||||
break
|
||||
}
|
||||
}
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.IPAddress = bf.ReadUint32()
|
||||
m.Port = bf.ReadUint16()
|
||||
_ = bf.ReadUint8()
|
||||
_ = bf.ReadUint16()
|
||||
m.StageID = bf.ReadBytes(32)
|
||||
_ = bf.ReadUint32()
|
||||
m.Type = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user