Documentation
¶
Overview ¶
Package sendtables contains sendtable specific magic and should really be better documented (TODO).
Index ¶
Constants ¶
View Source
const ( SPT_Int int = iota SPT_Float SPT_Vector SPT_VectorXY SPT_String SPT_Array SPT_DataTable SPT_Int64 )
View Source
const ( DT_MaxStringBits = 9 DT_MaxStringLength = 1 << DT_MaxStringBits )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { ID int ServerClass *ServerClass // contains filtered or unexported fields }
func NewEntity ¶
func NewEntity(id int, serverClass *ServerClass) *Entity
func (*Entity) ApplyUpdate ¶
func (*Entity) CollectProperties ¶
func (*Entity) FindProperty ¶
func (e *Entity) FindProperty(name string) *PropertyEntry
FindProperty finds a property on the entity by name.
func (*Entity) Props ¶
func (e *Entity) Props() []PropertyEntry
Props returns all property entries for a entity.
type EntityCreatedEvent ¶
type EntityCreatedEvent struct { ServerClass *ServerClass Entity *Entity }
type EntityCreatedHandler ¶
type EntityCreatedHandler func(EntityCreatedEvent)
type FlattenedPropEntry ¶
type FlattenedPropEntry struct {
// contains filtered or unexported fields
}
func (FlattenedPropEntry) Name ¶
func (fpe FlattenedPropEntry) Name() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) FindServerClassByName ¶
func (p *Parser) FindServerClassByName(name string) *ServerClass
func (*Parser) ParsePacket ¶
func (*Parser) ServerClasses ¶
func (p *Parser) ServerClasses() []*ServerClass
type PropertyEntry ¶
type PropertyEntry struct {
// contains filtered or unexported fields
}
func NewPropertyEntry ¶
func NewPropertyEntry(entry *FlattenedPropEntry, index int) PropertyEntry
func (*PropertyEntry) Entry ¶
func (pe *PropertyEntry) Entry() *FlattenedPropEntry
func (*PropertyEntry) FirePropertyUpdate ¶
func (pe *PropertyEntry) FirePropertyUpdate(value PropValue)
func (*PropertyEntry) RegisterPropertyUpdateHandler ¶
func (pe *PropertyEntry) RegisterPropertyUpdateHandler(handler PropertyUpdateHandler)
type PropertyUpdateHandler ¶
type PropertyUpdateHandler func(PropValue)
type SendPropertyFlags ¶
type SendPropertyFlags int
SendPropertyFlags contains multiple send property flags.
const ( SPF_Unsigned SendPropertyFlags = (1 << iota) SPF_Coord SPF_NoScale SPF_RoundDown SPF_RoundUp SPF_Normal SPF_Exclude SPF_XYZE SPF_InsideArray SPF_ProxyAlwaysYes SPF_IsVectorElement SPF_Collapsible SPF_CoordMp SPF_CoordMpLowPrecision SPF_CoordMpIntegral SPF_CellCoord SPF_CellCoordLowPrecision SPF_CellCoordIntegral SPF_ChangesOften SPF_VarInt )
func (SendPropertyFlags) HasFlagSet ¶
func (spf SendPropertyFlags) HasFlagSet(flag SendPropertyFlags) bool
HasFlagSet returns true if the given flag is set
type SendTableProperty ¶
type ServerClass ¶
type ServerClass struct { ClassID int DataTableID int Name string DTName string FlattenedProps []FlattenedPropEntry BaseClasses []*ServerClass // contains filtered or unexported fields }
func (*ServerClass) FireEntityCreatedEvent ¶
func (sc *ServerClass) FireEntityCreatedEvent(entity *Entity)
func (*ServerClass) RegisterEntityCreatedHandler ¶
func (sc *ServerClass) RegisterEntityCreatedHandler(handler EntityCreatedHandler)
func (*ServerClass) String ¶
func (sc *ServerClass) String() string
Click to show internal directories.
Click to hide internal directories.