Stage object notification test

This commit is contained in:
Andrew Gutekanst
2020-01-23 19:59:26 -05:00
parent 28e0dafd54
commit b1b4f390f0
4 changed files with 43 additions and 8 deletions

View File

@@ -6,7 +6,9 @@ import (
)
// MsgSysInsertUser represents the MSG_SYS_INSERT_USER
type MsgSysInsertUser struct{}
type MsgSysInsertUser struct {
CharID uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgSysInsertUser) Opcode() network.PacketID {
@@ -20,5 +22,6 @@ func (m *MsgSysInsertUser) Parse(bf *byteframe.ByteFrame) error {
// Build builds a binary packet from the current data.
func (m *MsgSysInsertUser) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
bf.WriteUint32(m.CharID)
return nil
}

View File

@@ -6,7 +6,10 @@ import (
)
// MsgSysNotifyUserBinary represents the MSG_SYS_NOTIFY_USER_BINARY
type MsgSysNotifyUserBinary struct{}
type MsgSysNotifyUserBinary struct {
CharID uint32
BinaryType uint8
}
// Opcode returns the ID associated with this packet type.
func (m *MsgSysNotifyUserBinary) Opcode() network.PacketID {
@@ -20,5 +23,7 @@ func (m *MsgSysNotifyUserBinary) Parse(bf *byteframe.ByteFrame) error {
// Build builds a binary packet from the current data.
func (m *MsgSysNotifyUserBinary) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
bf.WriteUint32(m.CharID)
bf.WriteUint8(m.BinaryType)
return nil
}