mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
Implement MsgSysReserveStage
This commit is contained in:
@@ -6,7 +6,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// MsgSysReserveStage represents the MSG_SYS_RESERVE_STAGE
|
// MsgSysReserveStage represents the MSG_SYS_RESERVE_STAGE
|
||||||
type MsgSysReserveStage struct{}
|
type MsgSysReserveStage struct {
|
||||||
|
AckHandle uint32
|
||||||
|
Unk0 uint8 // Made with: `16 * x | 1;`, unknown `x` values.
|
||||||
|
StageIDLength uint8
|
||||||
|
StageID string // NULL terminated string.
|
||||||
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
func (m *MsgSysReserveStage) Opcode() network.PacketID {
|
func (m *MsgSysReserveStage) Opcode() network.PacketID {
|
||||||
@@ -15,10 +20,14 @@ func (m *MsgSysReserveStage) Opcode() network.PacketID {
|
|||||||
|
|
||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgSysReserveStage) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgSysReserveStage) Parse(bf *byteframe.ByteFrame) error {
|
||||||
panic("Not implemented")
|
m.AckHandle = bf.ReadUint32()
|
||||||
|
m.Unk0 = 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.
|
// Build builds a binary packet from the current data.
|
||||||
func (m *MsgSysReserveStage) Build(bf *byteframe.ByteFrame) error {
|
func (m *MsgSysReserveStage) Build(bf *byteframe.ByteFrame) error {
|
||||||
panic("Not implemented")
|
panic("Not implemented")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,7 +287,13 @@ func handleMsgSysLockStage(s *Session, p mhfpacket.MHFPacket) {}
|
|||||||
|
|
||||||
func handleMsgSysUnlockStage(s *Session, p mhfpacket.MHFPacket) {}
|
func handleMsgSysUnlockStage(s *Session, p mhfpacket.MHFPacket) {}
|
||||||
|
|
||||||
func handleMsgSysReserveStage(s *Session, p mhfpacket.MHFPacket) {}
|
func handleMsgSysReserveStage(s *Session, p mhfpacket.MHFPacket) {
|
||||||
|
pkt := p.(*mhfpacket.MsgSysReserveStage)
|
||||||
|
|
||||||
|
fmt.Printf("Got reserve stage req, Unk0:%v, StageID:%q\n", pkt.Unk0, pkt.StageID)
|
||||||
|
|
||||||
|
s.QueueAck(pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
|
||||||
|
}
|
||||||
|
|
||||||
func handleMsgSysUnreserveStage(s *Session, p mhfpacket.MHFPacket) {}
|
func handleMsgSysUnreserveStage(s *Session, p mhfpacket.MHFPacket) {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user