mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
Implement MsgSysSetStageBinary parser
This commit is contained in:
@@ -6,7 +6,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// MsgSysSetStageBinary represents the MSG_SYS_SET_STAGE_BINARY
|
// 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.
|
// Opcode returns the ID associated with this packet type.
|
||||||
func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
||||||
@@ -15,10 +22,16 @@ func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
|||||||
|
|
||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgSysSetStageBinary) Parse(bf *byteframe.ByteFrame) error {
|
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.
|
// Build builds a binary packet from the current data.
|
||||||
func (m *MsgSysSetStageBinary) Build(bf *byteframe.ByteFrame) error {
|
func (m *MsgSysSetStageBinary) Build(bf *byteframe.ByteFrame) error {
|
||||||
panic("Not implemented")
|
panic("Not implemented")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user