C# Class invertika_game.Game.GameHandler

Inheritance: ISL.Server.Network.ConnectionHandler
Mostrar archivo Open project: Invertika/server Class Usage Examples

Public Methods

Method Description
GameHandler ( ) : System
addPendingCharacter ( string token, Character ch ) : void
completeServerChange ( int id, string token, string address, int port ) : void
deletePendingClient ( ISL.Server.Network.NetComputer client ) : void
deletePendingConnect ( object data ) : void
kill ( Character ch ) : void
prepareServerChange ( Character ch ) : void
sendTo ( Character beingPtr, ISL.Server.Network.MessageOut msg ) : void
startListen ( ushort port ) : bool
tokenMatched ( ISL.Server.Network.NetComputer client, object data ) : void
updateCharacter ( int charid, int partyid ) : void

Protected Methods

Method Description
computerConnected ( TcpClient peer ) : ISL.Server.Network.NetComputer
computerDisconnected ( ISL.Server.Network.NetComputer comp ) : void
processMessage ( ISL.Server.Network.NetComputer computer, ISL.Server.Network.MessageIn message ) : void

Private Methods

Method Description
findActorNear ( Actor p, int id ) : Actor
findCharacterNear ( Actor p, int id ) : Character
getClientByNameSlow ( string name ) : GameClient
handleActionChange ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleAttack ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleDirectionChange ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleDisconnect ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleDrop ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleEquip ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleLowerAttribute ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleMoveItem ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleNpc ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleNpcBuySell ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleNpcPostSend ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handlePartyInvite ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handlePickup ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleRaiseAttribute ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleSay ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleTrade ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleTradeRequest ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleUnequip ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleUseItem ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleUseSpecial ( GameClient client, ISL.Server.Network.MessageIn message ) : void
handleWalk ( GameClient client, ISL.Server.Network.MessageIn message ) : void
sendNpcError ( GameClient client, int id, string errorMsg ) : void

Method Details

GameHandler() public method

public GameHandler ( ) : System
return System

addPendingCharacter() public method

public addPendingCharacter ( string token, Character ch ) : void
token string
ch Character
return void

completeServerChange() public method

public completeServerChange ( int id, string token, string address, int port ) : void
id int
token string
address string
port int
return void

computerConnected() protected method

protected computerConnected ( TcpClient peer ) : ISL.Server.Network.NetComputer
peer System.Net.Sockets.TcpClient
return ISL.Server.Network.NetComputer

computerDisconnected() protected method

protected computerDisconnected ( ISL.Server.Network.NetComputer comp ) : void
comp ISL.Server.Network.NetComputer
return void

deletePendingClient() public method

public deletePendingClient ( ISL.Server.Network.NetComputer client ) : void
client ISL.Server.Network.NetComputer
return void

deletePendingConnect() public method

public deletePendingConnect ( object data ) : void
data object
return void

kill() public method

public kill ( Character ch ) : void
ch Character
return void

prepareServerChange() public method

public prepareServerChange ( Character ch ) : void
ch Character
return void

processMessage() protected method

protected processMessage ( ISL.Server.Network.NetComputer computer, ISL.Server.Network.MessageIn message ) : void
computer ISL.Server.Network.NetComputer
message ISL.Server.Network.MessageIn
return void

sendTo() public method

public sendTo ( Character beingPtr, ISL.Server.Network.MessageOut msg ) : void
beingPtr Character
msg ISL.Server.Network.MessageOut
return void

startListen() public method

public startListen ( ushort port ) : bool
port ushort
return bool

tokenMatched() public method

public tokenMatched ( ISL.Server.Network.NetComputer client, object data ) : void
client ISL.Server.Network.NetComputer
data object
return void

updateCharacter() public method

public updateCharacter ( int charid, int partyid ) : void
charid int
partyid int
return void