mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 00:44:42 +01:00
Initial chat prototype
This commit is contained in:
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysCastedBinary represents the MSG_SYS_CASTED_BINARY
|
||||
type MsgSysCastedBinary struct{}
|
||||
type MsgSysCastedBinary struct {
|
||||
CharID uint32
|
||||
Type0 uint8
|
||||
Type1 uint8
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysCastedBinary) Opcode() network.PacketID {
|
||||
@@ -20,5 +25,10 @@ func (m *MsgSysCastedBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysCastedBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
bf.WriteUint32(m.CharID)
|
||||
bf.WriteUint8(m.Type0)
|
||||
bf.WriteUint8(m.Type0)
|
||||
bf.WriteUint16(uint16(len(m.RawDataPayload)))
|
||||
bf.WriteBytes(m.RawDataPayload)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user