mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
fix parsing and handling of DistItem packets
This commit is contained in:
@@ -67,10 +67,28 @@ func handleMsgMhfEnumerateDistItem(s *Session, p mhfpacket.MHFPacket) {
|
||||
bf.WriteUint16(distData.MaxSR)
|
||||
bf.WriteUint16(distData.MinGR)
|
||||
bf.WriteUint16(distData.MaxGR)
|
||||
bf.WriteUint32(0) // Unk
|
||||
bf.WriteUint32(0) // Unk
|
||||
ps.Uint16(bf, distData.EventName, true)
|
||||
bf.WriteBytes(make([]byte, 391))
|
||||
bf.WriteUint8(0)
|
||||
bf.WriteUint16(0)
|
||||
bf.WriteUint8(0)
|
||||
bf.WriteUint16(0)
|
||||
bf.WriteUint16(0)
|
||||
bf.WriteUint8(0)
|
||||
ps.Uint8(bf, distData.EventName, true)
|
||||
for i := 0; i < 6; i++ {
|
||||
for j := 0; j < 13; j++ {
|
||||
bf.WriteUint8(0)
|
||||
bf.WriteUint32(0)
|
||||
}
|
||||
}
|
||||
i := uint8(0)
|
||||
bf.WriteUint8(i)
|
||||
if i <= 10 {
|
||||
for j := uint8(0); j < i; j++ {
|
||||
bf.WriteUint32(0)
|
||||
bf.WriteUint32(0)
|
||||
bf.WriteUint32(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
resp := byteframe.NewByteFrame()
|
||||
resp.WriteUint16(uint16(distCount))
|
||||
|
||||
Reference in New Issue
Block a user