mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 00:15:08 +01:00
Implement MsgSysSetStagePass parser
This commit is contained in:
@@ -6,7 +6,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// MsgSysSetStagePass represents the MSG_SYS_SET_STAGE_PASS
|
// MsgSysSetStagePass represents the MSG_SYS_SET_STAGE_PASS
|
||||||
type MsgSysSetStagePass struct{}
|
type MsgSysSetStagePass struct {
|
||||||
|
Unk0 uint8 // Hardcoded 0 in the binary
|
||||||
|
PasswordLength uint8
|
||||||
|
Password string // NULL-terminated string
|
||||||
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
func (m *MsgSysSetStagePass) Opcode() network.PacketID {
|
func (m *MsgSysSetStagePass) Opcode() network.PacketID {
|
||||||
@@ -15,10 +19,13 @@ func (m *MsgSysSetStagePass) Opcode() network.PacketID {
|
|||||||
|
|
||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgSysSetStagePass) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgSysSetStagePass) Parse(bf *byteframe.ByteFrame) error {
|
||||||
panic("Not implemented")
|
m.Unk0 = bf.ReadUint8()
|
||||||
|
m.PasswordLength = bf.ReadUint8()
|
||||||
|
m.Password = string(bf.ReadBytes(uint(m.PasswordLength)))
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build builds a binary packet from the current data.
|
// Build builds a binary packet from the current data.
|
||||||
func (m *MsgSysSetStagePass) Build(bf *byteframe.ByteFrame) error {
|
func (m *MsgSysSetStagePass) Build(bf *byteframe.ByteFrame) error {
|
||||||
panic("Not implemented")
|
panic("Not implemented")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user