mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
Implement MsgSysSetStageBinary parser
This commit is contained in:
@@ -6,7 +6,14 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysSetStageBinary represents the MSG_SYS_SET_STAGE_BINARY
|
||||
type MsgSysSetStageBinary struct{}
|
||||
type MsgSysSetStageBinary struct {
|
||||
Unk0 uint8
|
||||
BinaryType uint8 // Index
|
||||
StageIDLength uint8 // <= 0x20
|
||||
DataSize uint16 // <= 0x400
|
||||
StageID string
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
||||
@@ -15,10 +22,16 @@ func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysSetStageBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.BinaryType = bf.ReadUint8()
|
||||
m.StageIDLength = bf.ReadUint8()
|
||||
m.DataSize = bf.ReadUint16()
|
||||
m.StageID = string(bf.ReadBytes(uint(m.StageIDLength)))
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysSetStageBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user