Documentation ¶
Index ¶
- Variables
- type AccountLogin
- type BoughtItem
- type BuyItems
- type CharacterLogin
- type ContextMenuRequest
- type ContextMenuSelection
- type DoubleClick
- type DropRequest
- type GUMPReply
- type GameServerLogin
- type GeneralInformationPacket
- type IgnoredPacket
- type Info
- type LiftRequest
- type LoginSeed
- type MacroRequest
- type MalformedPacket
- type NameRequest
- type OPLCacheMiss
- type Packet
- type Ping
- type PlayerStatusRequest
- type ProtocolExtension
- type Reader
- type RenameRequest
- type SelectServer
- type SellItem
- type SellResponse
- type SingleClick
- type Speech
- type TargetResponse
- type TextGUMPReply
- type UnknownPacket
- type UnsupportedPacket
- type Version
- type ViewRange
- type WalkRequest
- type WearItemRequest
Constants ¶
This section is empty.
Variables ¶
var InfoTable = [256]Info{}/* 256 elements not displayed */
InfoTable is a slice of 256 Info structs who's index in the slice matches the packet ID.
Functions ¶
This section is empty.
Types ¶
type AccountLogin ¶
type AccountLogin struct { // Account username Username string // Account password in plain-text Password string // contains filtered or unexported fields }
AccountLogin is the second packet sent to the login server and attempts to authenticate with a clear-text username and password o_O
type BoughtItem ¶
type BoughtItem struct { // Serial of the item to be bought Item uo.Serial // Amount to buy Amount int }
BoughtItem describes how much of which item to buy.
type BuyItems ¶
type BuyItems struct { // Serial of the vendor we are buying from Vendor uo.Serial // List of items we are buying BoughtItems []BoughtItem // contains filtered or unexported fields }
BuyItems is sent by the client in response to the vendor buy window.
type CharacterLogin ¶
type CharacterLogin struct { // Character slot chosen Slot int // contains filtered or unexported fields }
CharacterLogin is used to request a character login.
type ContextMenuRequest ¶
type ContextMenuRequest struct { // Serial of the object the context menu should be opened for Serial uo.Serial // contains filtered or unexported fields }
ContextMenuRequest is sent by the client when the user requests a context menu for an object.
type ContextMenuSelection ¶
type ContextMenuSelection struct { // Serial of the object the context menu was opened on Serial uo.Serial // Unique ID of the entry selected EntryID uint16 // contains filtered or unexported fields }
ContextMenuSelection is sent by the client when the user selects a context menu entry.
type DoubleClick ¶
type DoubleClick struct { // Object ID clicked on Object uo.Serial // WantPaperDoll is true if this is a request for our own paper doll WantPaperDoll bool // contains filtered or unexported fields }
DoubleClick is sent by the client when the player double-clicks an object
type DropRequest ¶
type DropRequest struct { // Serial of the object to drop Item uo.Serial // Location to drop the item Location uo.Location // Serial of the container to drop the item into. uo.SerialSystem means to // drop to the world. Container uo.Serial // contains filtered or unexported fields }
DropRequest is sent when the player drops an item from the cursor.
type GUMPReply ¶
type GUMPReply struct { // First serial in the 0xB0 packet, in sharduo this is usually the mobile's // serial MobileSerial uo.Serial // Second serial in the 0xB0 packet, in sharduo this is an identifier unique // on the net state but not globally GUMPSerial uo.Serial // The button ID used to reply, 0 means closed by the client Button uint32 // List of all checkbox and radio buttons that are enabled, all valid values // that do not appear in this list are unset Switches []uint32 // Map of text entry contents TextEntries map[uint16]string // contains filtered or unexported fields }
GUMPReply describes a client's response to a generic GUMP form.
type GameServerLogin ¶
type GameServerLogin struct { // Account username Username string // Account password in plain-text Password string // Key given by the login server Key uo.Serial // contains filtered or unexported fields }
GameServerLogin is used to authenticate to the game server in clear text.
type IgnoredPacket ¶
type IgnoredPacket struct {
// contains filtered or unexported fields
}
IgnoredPacket is a packet that we could fetch all the data for, but we do not have a struct nor a constructor, but it's OK for the server to ignore this.
type Info ¶
type Info struct { // Packet ID ID byte // Length of the packet -1=dynamic, 0=unsupported Length int }
Info contains the ID and length of a client packet.
type LiftRequest ¶
type LiftRequest struct { // Serial of the object to lift Item uo.Serial // Amount to lift Amount int // contains filtered or unexported fields }
LiftRequest is sent when the player lifts an item with the cursor.
type LoginSeed ¶
type LoginSeed struct { // Connection seed Seed uint32 // Version major part VersionMajor int // Version minor part VersionMinor int // Version patch part VersionPatch int // Version extra part VersionExtra int // contains filtered or unexported fields }
LoginSeed is the first packet sent to the login server
type MacroRequest ¶
type MacroRequest struct { MacroType uo.MacroType // What type of macro action is requested Offset int // Skill number, spell number, or action number // contains filtered or unexported fields }
MacroRequest is sent by the client when requesting skill use, spell casts, door open macro, or bow and salute actions.
type MalformedPacket ¶
type MalformedPacket struct {
// contains filtered or unexported fields
}
MalformedPacket is sent when there is a non-specific decoding error.
type NameRequest ¶
type NameRequest struct { Serial uo.Serial // Serial of the object who's name is being requested. // contains filtered or unexported fields }
NameRequest is sent by the client to request the name of an object.
type OPLCacheMiss ¶
type OPLCacheMiss struct { Serials []uo.Serial // Object serials of all objects the client requested OPL packets for. // contains filtered or unexported fields }
OPLCacheMiss is sent by the client to request OPL packets for objects.
type Packet ¶
type Packet interface {
ID() byte
}
Packet is the interface all client packets implement.
type Ping ¶
type Ping struct { // Don't know what this is used for Key byte // contains filtered or unexported fields }
Ping is used for TCP keepalive and possibly latency determination.
type PlayerStatusRequest ¶
type PlayerStatusRequest struct { // Type of the request StatusRequestType uo.StatusRequestType // ID of the player's mobile PlayerMobileID uo.Serial // contains filtered or unexported fields }
PlayerStatusRequest is sent by the client to request status and skills updates.
type ProtocolExtension ¶
type ProtocolExtension struct { // Type of request RequestType uo.ProtocolExtensionRequest // contains filtered or unexported fields }
ProtocolExtension is sent by ClassicUO to query party and guild member positions for the built-in world map. I think the latest versions of Razor, UO Steam, and UOAM/UOPS do this as well.
type Reader ¶
type Reader struct { // Header is the connection header, or nil if it has not been read. Header []byte // contains filtered or unexported fields }
Reader reads the client packets and returns the bytes of the packet.
func (*Reader) Read ¶
Read reads the bytes of the next client packet and returns a slice of those bytes or an error.
func (*Reader) ReadConnectionHeader ¶
ReadConnectionHeader reads the 8-byte connection header used by Ultima Online tcp streams
func (*Reader) ReadPacket ¶
ReadPacket reads the bytes as in Read but returns a client packet object.
type RenameRequest ¶
type RenameRequest struct { Serial uo.Serial // Serial of the mobile to rename. Name string // The new name of the mobile, truncated to 30 characters. // contains filtered or unexported fields }
RenameRequest is sent by the client when renaming a mobile via their status bar.
type SelectServer ¶
type SelectServer struct { // Index is the index of the server on the list. Index int // contains filtered or unexported fields }
SelectServer is used during the login process to request the connection details of one of the servers on the list.
type SellItem ¶
type SellItem struct { // Serial of the item to sell Serial uo.Serial // Amount of the item to sell from the stack Amount int }
SellItem represents one item being sold by the player.
type SellResponse ¶
type SellResponse struct { // Serial of the vendor being sold to Vendor uo.Serial // List of items bought SellItems []SellItem // contains filtered or unexported fields }
SellResponse is sent by the client to sell items to a vendor.
type SingleClick ¶
type SingleClick struct { // Object ID clicked on Object uo.Serial // contains filtered or unexported fields }
SingleClick is sent by the client when the player single-clicks an object
type Speech ¶
type Speech struct { // Type of speech Type uo.SpeechType // Hue of the text Hue uo.Hue // Font of the text Font uo.Font // Text of the message Text string // contains filtered or unexported fields }
Speech is sent by the client to request speech.
type TargetResponse ¶
type TargetResponse struct { // Target type TargetType uo.TargetType // Serial of this targeting request TargetSerial uo.Serial // Cursor type CursorType uo.CursorType // TargetObject is the serial of the object clicked on, or uo.SerialZero if // no object was targeted. TargetObject uo.Serial // Location of the target. Location uo.Location // Graphic of the object clicked, if any Graphic uo.Graphic // contains filtered or unexported fields }
TargetResponse is sent by the client to respond to a tardc.Geting cursor
type TextGUMPReply ¶
type TextGUMPReply struct { Serial uo.Serial // Serial of the GUMP we are replying to Text string // Reply text // contains filtered or unexported fields }
TextGUMPReply is sent to respond to graphical text requests from 0xAB.
type UnknownPacket ¶
type UnknownPacket struct { PType string // contains filtered or unexported fields }
UnknownPacket is sent when the packet being decoded has no length information. This dc.Puts the packet stream in an inconsistent state.
type UnsupportedPacket ¶
type UnsupportedPacket struct { PType string // contains filtered or unexported fields }
UnsupportedPacket is sent when the packet being decoded does not have a constructor function yet.
func NewUnsupportedPacket ¶
func NewUnsupportedPacket(ptype string, in []byte) *UnsupportedPacket
NewUnsupportedPacket creates a new UnsupportedPacket properly initialized.
type Version ¶
type Version struct { // Version string String string // contains filtered or unexported fields }
Version is used to communicate to the server the client's version string.
type ViewRange ¶
type ViewRange struct { // Requested view range, clamped to between 4 and 18 inclusive Range int16 // contains filtered or unexported fields }
ViewRange is sent by the client to request a new view range.
type WalkRequest ¶
type WalkRequest struct { // Direction to walk Direction uo.Direction // If true this is a run request IsRunning bool // Walk sequence number Sequence int // Fast-walk prevention key FastWalkKey uint32 // contains filtered or unexported fields }
WalkRequest is sent by the client to request walking or running in a direction.