|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.kernel.commands.AbstractCommandable wyvern.world.Registration
Contains all the code for creating new players, registering existing players, and registering players visiting from other servers. The wyvern.world.Customs class handles the server-to-server communication for transfers. Once the transfer is approved, the player connects to the server using these methods.
Field Summary |
Fields inherited from class wyvern.kernel.commands.AbstractCommandable |
hookList_, queue_, started_ |
Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
Fields inherited from interface wyvern.common.net.RPCConstants.TextStyle |
TEXT_DAMAGE, TEXT_ECHO, TEXT_FIXED, TEXT_HIT, TEXT_INFO, TEXT_PLAIN, TEXT_SYSTEM, TEXT_TALK, TEXT_TELL, TEXT_WIZ |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Fields inherited from interface wyvern.common.net.RemoteAudio |
DEFAULT_ALERT_GAIN, DEFAULT_ALERT_REPEAT_DELAY, DEFAULT_ALERT_REPEATS, DEFAULT_GAIN, DEFAULT_REPEAT_DELAY, DEFAULT_REPEATS |
Method Summary | |
void |
command(java.lang.String cmd)
Enqueues a command into the object's command queue. |
void |
commandNow()
|
CommandEvent |
createEvent(CommandEvent event)
Creates a CommandEvent that encapsulates all the state necessary to perform the command. |
boolean |
execute(CommandEvent e)
Executes a login event on the kernel thread. |
static java.lang.String |
getMessageOfTheDay()
|
boolean |
knowsCommand(java.lang.String command)
Returns true if this Command wants to handle the command. |
Player |
loadRobot(java.lang.String name)
|
static void |
login(RemoteClient client,
wyvern.server.IClientSession session,
java.lang.String name,
java.lang.String password,
java.lang.String version,
Dimension size)
Begins the login process of loading/validating the player and sticking them in a map. |
static void |
setMessageOfTheDay(java.lang.String message)
|
java.lang.String |
toString()
Returns the short (usually one-line) description of the object. |
Methods inherited from class wyvern.kernel.commands.AbstractCommandable |
addAttack, addHook, addMessageListener, addMethodHook, checkAnimated, command, commandNow, destroy, ensureAI, ensureEventQueue, fireMessageReceived, getAI, getCapName, getCombatQueue, getCommand, getEncumbrance, getFiringPoint, getHookList, getHooks, getInventory, getName, getQueue, isCommandable, isStarted, isTelnet, message, message, message, pauseSound, playAlert, playAlert, playDefaultMusic, playPriorityMusic, playPriorityMusic, playSound, playSound, registerCommand, removeAttack, removeHook, removeMessageListener, removeMethodHook, resumeSound, runFailedPostHook, runMethodHook, runPostHook, runPreHook, sendPicture, sendPicture, setAI, setEncumbrance, setMusicGain, setName, setSoundGain, start, stop, stopAllSounds, stopMusic, stopSound, unregisterCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Method Detail |
public static void login(RemoteClient client, wyvern.server.IClientSession session, java.lang.String name, java.lang.String password, java.lang.String version, Dimension size)
client
- the object that writes data to the clientsession
- the object that reads data from the clientname
- player's namepassword
- encrypted passwordversion
- client version (a string)size
- the view width and heightpublic boolean knowsCommand(java.lang.String command)
Command
This method exists to allow more than one game object to implement the same command verb, but with different expected arguments.
If two objects register for the same command and the same arguments, the object that was registered most recently gets to handle at the command.
knowsCommand
in interface Command
command
- the entire command string, including arguments
public void command(java.lang.String cmd)
Commandable
This method is the main input to a Commandable object. Command originators (e.g. a user, an AI, or any game code) can issue commands to this object by calling this method. The Commandable is responsible for enqueueing a CommandEvent encapsulating the command and the agent of the command.
By default, events created this way are flagged as not player-originated.
command
in interface Commandable
command
in class AbstractCommandable
public void commandNow()
public CommandEvent createEvent(CommandEvent event)
Command
This method is called by the kernel. The kernel passes the event to the pre-hook, then calls Command.execute() (below) to execute the event, and finally calls the post-hook.
createEvent
in interface Command
event
- a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent e)
execute
in interface Command
e
- the CommandEvent to execute
public java.lang.String toString()
MapObject
toString
in class MapObject
public static void setMessageOfTheDay(java.lang.String message)
public static java.lang.String getMessageOfTheDay()
public Player loadRobot(java.lang.String name) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |