mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
fix raviente announcements
This commit is contained in:
@@ -3,9 +3,9 @@ package mhfpacket
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"erupe-ce/network/clientctx"
|
|
||||||
"erupe-ce/network"
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
|
"erupe-ce/network"
|
||||||
|
"erupe-ce/network/clientctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgMhfAnnounce represents the MSG_MHF_ANNOUNCE
|
// MsgMhfAnnounce represents the MSG_MHF_ANNOUNCE
|
||||||
@@ -29,13 +29,9 @@ func (m *MsgMhfAnnounce) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
|||||||
m.Port = bf.ReadUint16()
|
m.Port = bf.ReadUint16()
|
||||||
_ = bf.ReadUint8()
|
_ = bf.ReadUint8()
|
||||||
_ = bf.ReadUint16()
|
_ = bf.ReadUint16()
|
||||||
m.StageID = bf.ReadNullTerminatedBytes()
|
m.StageID = bf.ReadBytes(32)
|
||||||
for {
|
_ = bf.ReadUint32()
|
||||||
if bf.ReadUint8() != 0 {
|
|
||||||
m.Type = bf.ReadUint8()
|
m.Type = bf.ReadUint8()
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -351,8 +351,7 @@ func (s *Server) BroadcastRaviente(ip uint32, port uint16, stage []byte, _type u
|
|||||||
bf.WriteUint32(ip) // IP address
|
bf.WriteUint32(ip) // IP address
|
||||||
bf.WriteUint16(port) // Port
|
bf.WriteUint16(port) // Port
|
||||||
bf.WriteUint16(0) // Unk
|
bf.WriteUint16(0) // Unk
|
||||||
bf.WriteNullTerminatedBytes(stage)
|
bf.WriteBytes(stage)
|
||||||
bf.WriteBytes(make([]byte, 17))
|
|
||||||
s.WorldcastMHF(&mhfpacket.MsgSysCastedBinary{
|
s.WorldcastMHF(&mhfpacket.MsgSysCastedBinary{
|
||||||
CharID: 0x00000000,
|
CharID: 0x00000000,
|
||||||
BroadcastType: BroadcastTypeServer,
|
BroadcastType: BroadcastTypeServer,
|
||||||
|
|||||||
Reference in New Issue
Block a user