Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.GameClient Class Reference

Represents a single connection to the game server. More...

List of all members.

Public Types

enum  eClientAddons { bit4 = 0x10, bit5 = 0x20, Foundations = 0x40, NewFrontiers = 0x80 }
 The client addons enum. More...
enum  eClientState {
  NotConnected = 0x00, Connecting = 0x01, CharScreen = 0x02, WorldEnter = 0x03,
  Playing = 0x04, Linkdead = 0x05, Disconnected = 0x06
}
 Current state of the client. More...
enum  eClientType {
  Unknown = -1, Classic = 1, ShroudedIsles = 2, TrialsOfAtlantis = 3,
  Catacombs = 4, DarknessRising = 5, LabyrinthOfTheMinotaur = 6
}
 The client software type enum. More...
enum  eClientVersion {
  VersionNotChecked = -1, VersionUnknown = 0, _FirstVersion = 168, Version168 = 168,
  Version169 = 169, Version170 = 170, Version171 = 171, Version172 = 172,
  Version173 = 173, Version174 = 174, Version175 = 175, Version176 = 176,
  Version177 = 177, Version178 = 178, Version179 = 179, Version180 = 180,
  Version181 = 181, Version182 = 182, Version183 = 183, Version184 = 184,
  Version185 = 185, Version186 = 186, Version187 = 187, Version188 = 188,
  Version189 = 189, Version190 = 190, Version191 = 191, Version192 = 192,
  Version193 = 193, Version194 = 194, Version195 = 195, Version196 = 196,
  Version197 = 197, Version198 = 198, Version199 = 199, Version1100 = 1100,
  Version1101 = 1101, Version1102 = 1102, Version1103 = 1103, Version1104 = 1104,
  Version1105 = 1105, Version1106 = 1106, Version1107 = 1107, Version1108 = 1108,
  Version1109 = 1109, _LastVersion = 1109
}
 the version enum More...

Public Member Functions

 GameClient (BaseServer srvr)
 Constructor for a game client.
override void OnDisconnect ()
 Called when this client has been disconnected.
override void OnConnect ()
 Called when this client has connected.
void LoadPlayer (int accountindex)
void LoadPlayer (int accountindex, string playerClass)
 Loads a player from the DB.
void SavePlayer ()
 Saves a player to the DB.
override string ToString ()
 Returns short informations about the client.

Protected Member Functions

override void OnReceive (int numBytes)
 Called when a packet has been received.
void OnLinkdeath ()
 Called when a player goes linkdead.
internal void Quit ()
 Quits a client from the world.

Protected Attributes

Account m_account
 This variable holds the accountdata.
int m_activeCharIndex
 This variable holds the active charindex.
eClientAddons m_clientAddons
 Holds installed client addons.
volatile eClientState m_clientState = eClientState.NotConnected
 Holds the current clientstate.
eClientType m_clientType = eClientType.Unknown
 Holds client software type.
eClientVersion m_clientVersion
string m_localIP = ""
 Holds the time of the last UDP ping.
IPacketLib m_packetLib
 The packetsender of this client.
PacketProcessor m_packetProcessor
 The packetreceiver of this client.
long m_pingTime = DateTime.Now.Ticks
 Holds the time of the last ping.
GamePlayer m_player
 This variable holds all info about the active player.
int m_sessionID
 This variable holds the sessionid.
volatile bool m_udpConfirm
 This variable holds the UDP endpoint of this client.
IPEndPoint m_udpEndpoint
 This variable holds the UDP endpoint of this client.
long m_udpPingTime = DateTime.Now.Ticks
 Holds the time of the last UDP ping.

Properties

IPEndPoint UdpEndPoint [get, set]
 UDP address for this client.
eClientState ClientState [get, set]
 Gets or sets the client state.
bool IsPlaying [get]
 Gets whether or not the client is playing.
Account Account [get, set]
 Gets or sets the account being used by this client.
GamePlayer Player [get, set]
 Gets or sets the player this client is using.
int ActiveCharIndex [get, set]
 Gets or sets the character index for the player currently being used.
int SessionID [get, set]
 Gets or sets the session ID for this client.
long PingTime [get, set]
 Gets/Sets the time of last ping packet.
string LocalIP [get, set]
 UDP address for this client.
long UdpPingTime [get, set]
 Gets/Sets the time of last UDP ping packet.
bool UdpConfirm [get, set]
 UDP confirm flag from this client.
IPacketLib Out [get, set]
 Gets or sets the packet sender.
PacketProcessor PacketProcessor [get, set]
 Gets or Sets the packet receiver.
eClientVersion Version [get, set]
 the version of this client
eClientType ClientType [get, set]
 Gets/sets client software type (classic/SI/ToA/Catacombs)
eClientAddons ClientAddons [get, set]
 Gets/sets installed client addons (housing/new frontiers)

Detailed Description

Represents a single connection to the game server.


Member Enumeration Documentation

The client addons enum.

Current state of the client.

The client software type enum.

the version enum


Constructor & Destructor Documentation

DOL.GS.GameClient.GameClient ( BaseServer  srvr)

Constructor for a game client.

Parameters:
srvrThe server that's communicating with this client

Member Function Documentation

void DOL.GS.GameClient.LoadPlayer ( int  accountindex,
string  playerClass 
)

Loads a player from the DB.

Parameters:
accountindexIndex of the character within the account
override void DOL.GS.GameClient.OnConnect ( )

Called when this client has connected.

override void DOL.GS.GameClient.OnDisconnect ( )

Called when this client has been disconnected.

void DOL.GS.GameClient.OnLinkdeath ( ) [protected]

Called when a player goes linkdead.

override void DOL.GS.GameClient.OnReceive ( int  numBytes) [protected]

Called when a packet has been received.

Parameters:
numBytesThe number of bytes received

This function parses the incoming data into individual packets and then calls the appropriate handler.

internal void DOL.GS.GameClient.Quit ( ) [protected]

Quits a client from the world.

void DOL.GS.GameClient.SavePlayer ( )

Saves a player to the DB.

override string DOL.GS.GameClient.ToString ( )

Returns short informations about the client.

Returns:

Member Data Documentation

Account DOL.GS.GameClient.m_account [protected]

This variable holds the accountdata.

This variable holds the active charindex.

Holds installed client addons.

volatile eClientState DOL.GS.GameClient.m_clientState = eClientState.NotConnected [protected]

Holds the current clientstate.

eClientType DOL.GS.GameClient.m_clientType = eClientType.Unknown [protected]

Holds client software type.

string DOL.GS.GameClient.m_localIP = "" [protected]

Holds the time of the last UDP ping.

The packetsender of this client.

The packetreceiver of this client.

long DOL.GS.GameClient.m_pingTime = DateTime.Now.Ticks [protected]

Holds the time of the last ping.

This variable holds all info about the active player.

This variable holds the sessionid.

volatile bool DOL.GS.GameClient.m_udpConfirm [protected]

This variable holds the UDP endpoint of this client.

IPEndPoint DOL.GS.GameClient.m_udpEndpoint [protected]

This variable holds the UDP endpoint of this client.

long DOL.GS.GameClient.m_udpPingTime = DateTime.Now.Ticks [protected]

Holds the time of the last UDP ping.


Property Documentation

Account DOL.GS.GameClient.Account [get, set]

Gets or sets the account being used by this client.

int DOL.GS.GameClient.ActiveCharIndex [get, set]

Gets or sets the character index for the player currently being used.

eClientAddons DOL.GS.GameClient.ClientAddons [get, set]

Gets/sets installed client addons (housing/new frontiers)

eClientState DOL.GS.GameClient.ClientState [get, set]

Gets or sets the client state.

eClientType DOL.GS.GameClient.ClientType [get, set]

Gets/sets client software type (classic/SI/ToA/Catacombs)

bool DOL.GS.GameClient.IsPlaying [get]

Gets whether or not the client is playing.

string DOL.GS.GameClient.LocalIP [get, set]

UDP address for this client.

IPacketLib DOL.GS.GameClient.Out [get, set]

Gets or sets the packet sender.

PacketProcessor DOL.GS.GameClient.PacketProcessor [get, set]

Gets or Sets the packet receiver.

long DOL.GS.GameClient.PingTime [get, set]

Gets/Sets the time of last ping packet.

GamePlayer DOL.GS.GameClient.Player [get, set]

Gets or sets the player this client is using.

int DOL.GS.GameClient.SessionID [get, set]

Gets or sets the session ID for this client.

bool DOL.GS.GameClient.UdpConfirm [get, set]

UDP confirm flag from this client.

IPEndPoint DOL.GS.GameClient.UdpEndPoint [get, set]

UDP address for this client.

long DOL.GS.GameClient.UdpPingTime [get, set]

Gets/Sets the time of last UDP ping packet.

eClientVersion DOL.GS.GameClient.Version [get, set]

the version of this client


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events