| Deliantra documentation | view source | Contained in the Deliantra distribution. |
Deliantra::Protocol::Base - client protocol module
use base 'Deliantra::Protocol::Base'; # you have to subclass
Base class to implement a crossfire client.
Send a setup request for the given setting.
Called when a setup reply is received from the server.
Called after the last setup packet has been received, just before an addme request is sent.
default implementation calls msg
default implementation calls msg
tag, weight, face, name
$spell = {
tag => ...,
minlevel => ...,
casting_time => ...,
mana => ...,
grace => ...,
level => ...,
skill => ...,
path => ...,
face => ...,
name => ...,
message => ...,
};
(the default implementation calls delete then add)
current <flags> <x> <y> <width> <height> <hashstring>
Called whenever the map is to be erased completely.
Called whenever map data or faces have been received.
Called whenever the map has been scrolled.
Called with the face number of face structure whenever a face image
becomes known (either because face_find returned it, in which case
$changed is false, or because we got an update, in which case
$changed is true).
Find and pass to the $cb callback the png image data for the given
face, or the empty list if no face could be found, in which case it will
be requested from the server.
Send a single packet/line to the server.
Send a single packet/line to the server and encodes it to utf-8 before sending it.
Uses either command or ncom to send a user-level command to the server. Encodes the command to UTF-8.
If the server supports a fixed version of the ncom command and this is detected by this module, the following is also supported:
If the callback $cb1 is given, calls it with the absolute time when
this command has finished processing, as soon as this information is
available.
If the callback $cb2 is given it will be called when the command has
finished processing, to the best knowledge of this module :)
Sets the pickup configuration.
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/ Robin Redeker <elmex@ta-sa.org> http://www.ta-sa.org/
| Deliantra documentation | view source | Contained in the Deliantra distribution. |