Implement MsgSysCreateStage

This commit is contained in:
Andrew Gutekanst
2020-01-22 18:17:23 -05:00
parent 5a67d689e0
commit cf3cafa929
2 changed files with 24 additions and 4 deletions

View File

@@ -6,7 +6,13 @@ import (
)
// MsgSysCreateStage represents the MSG_SYS_CREATE_STAGE
type MsgSysCreateStage struct{}
type MsgSysCreateStage struct {
AckHandle uint32
Unk0 uint8
Unk1 uint8
StageIDLength uint8
StageID string // NULL terminated string.
}
// Opcode returns the ID associated with this packet type.
func (m *MsgSysCreateStage) Opcode() network.PacketID {
@@ -15,10 +21,15 @@ func (m *MsgSysCreateStage) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgSysCreateStage) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.Unk1 = bf.ReadUint8()
m.StageIDLength = bf.ReadUint8()
m.StageID = string(bf.ReadBytes(uint(m.StageIDLength)))
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgSysCreateStage) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}