binpacket

package
v0.0.0-...-b1f961f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChatTypeLocal    ChatType = 1
	ChatTypeGuild             = 2
	ChatTypeAlliance          = 3
	ChatTypeParty             = 4
	ChatTypeWhisper           = 5
)

Chat types

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatType

type ChatType uint8

ChatType represents the chat message type (Thanks to @Alice on discord for identifying these!)

type MsgBinChat

type MsgBinChat struct {
	Unk0       uint8
	Type       ChatType
	Flags      uint16
	Message    string
	SenderName string
}

MsgBinChat is a binpacket for chat messages.

func (*MsgBinChat) Build

func (m *MsgBinChat) Build(bf *byteframe.ByteFrame) error

Build builds a binary packet from the current data.

func (*MsgBinChat) Opcode

func (m *MsgBinChat) Opcode() network.PacketID

Opcode returns the ID associated with this packet type.

func (*MsgBinChat) Parse

func (m *MsgBinChat) Parse(bf *byteframe.ByteFrame) error

Parse parses the packet from binary

type MsgBinTargeted

type MsgBinTargeted struct {
	TargetCount    uint16
	TargetCharIDs  []uint32
	RawDataPayload []byte // The regular binary payload to be forwarded to the targets.
}

MsgBinTargeted is a format used for some broadcast types to target specific players, instead of groups (world, stage, etc). It forwards a normal binpacket in it's RawDataPayload

func (*MsgBinTargeted) Build

func (m *MsgBinTargeted) Build(bf *byteframe.ByteFrame) error

Build builds a binary packet from the current data.

func (*MsgBinTargeted) Opcode

func (m *MsgBinTargeted) Opcode() network.PacketID

Opcode returns the ID associated with this packet type.

func (*MsgBinTargeted) Parse

func (m *MsgBinTargeted) Parse(bf *byteframe.ByteFrame) error

Parse parses the packet from binary

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL