mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
docs: add doc.go files and godoc comments to all packages
Add package-level documentation (doc.go) to all 22 first-party packages and godoc comments to ~150 previously undocumented exported symbols across common/, network/, and server/.
This commit is contained in:
4
network/binpacket/doc.go
Normal file
4
network/binpacket/doc.go
Normal file
@@ -0,0 +1,4 @@
|
||||
// Package binpacket defines higher-level binary message types that are carried
|
||||
// inside MSG_SYS_CAST_BINARY / MSG_SYS_CASTED_BINARY packets. These include
|
||||
// chat messages, mail notifications, and targeted player broadcasts.
|
||||
package binpacket
|
||||
@@ -6,20 +6,24 @@ import (
|
||||
"erupe-ce/network"
|
||||
)
|
||||
|
||||
// MsgBinMailNotify is a binpacket broadcast to notify a player of new mail.
|
||||
type MsgBinMailNotify struct {
|
||||
SenderName string
|
||||
}
|
||||
|
||||
// Parse parses the packet from binary.
|
||||
func (m MsgBinMailNotify) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m MsgBinMailNotify) Build(bf *byteframe.ByteFrame) error {
|
||||
bf.WriteUint8(0x01) // Unk
|
||||
bf.WriteBytes(stringsupport.PaddedString(m.SenderName, 21, true))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m MsgBinMailNotify) Opcode() network.PacketID {
|
||||
return network.MSG_SYS_CASTED_BINARY
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user