Crossfire::Protocol::Base

Crossfire::Protocol::Base is a client protocol module.
Download

Crossfire::Protocol::Base Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Marc Lehmann
  • Publisher web site:
  • http://www.goof.com/pcg/marc/

Crossfire::Protocol::Base Tags


Crossfire::Protocol::Base Description

Crossfire::Protocol::Base is a client protocol module. Crossfire::Protocol::Base is a client protocol module.SYNOPSIS use base 'Crossfire::Protocol::Base'; # you have to subclassBase class to implement a crossfire client.new Crossfire::Protocol::Base host => ..., port => ...METHODS THAT CAN/MUST BE OVERWRITTEN$self->setup ($setup)Called after the last setup packet has been received, just before an addme request is sent.$self->addme_success $self->addme_failure $self->eof $conn->anim_update ($num) $conn->sound_play ($x, $y, $soundnum, $type) $conn->query ($flags, $prompt) $conn->drawextinfo ($color, $type, $subtype, $message) $conn->drawinfo ($color, $text) $conn->player_update ($player)tag, weight, face, name$conn->stats_update ($stats) $conn->container_add ($id, $item...) $conn->container_clear ($id) $conn->item_update ($item) $conn->item_delete ($item...) $conn->spell_add ($spell) $spell = { tag => ..., level => ..., casting_time => ..., mana => ..., grace => ..., damage => ..., skill => ..., path => ..., face => ..., name => ..., message => ..., };$conn->spell_update ($spell)(the default implementation calls delete then add)$conn->spell_delete ($spell) $conn->magicmap ($w, $h, $px, $py, $data) $conn->map_change ($type, ...) $conn->image_info ($numfaces, $chksum, ) $conn->map_change ($mode, ...) current < flags > < x > < y > < width > < height > < hashstring >$conn->map_clear Called whenever the map is to be erased completely.$conn->map_update (, , ...]) Called with a list of x|y coordinate pairs (as arrayrefs) for cells that have been updated and need refreshing.$conn->map_scroll ($dx, $dy) Called whenever the map has been scrolled.$conn->face_update ($facenum, $facedata, $changed) 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).$conn->face_find ($facenum, $facedata) Find and return the png image for the given face, or the empty list if no face could be found, in which case it will be requested from the server.$conn->send ($data)Send a single packet/line to the server.$conn->send_command ($command])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. Requirements: · Perl


Crossfire::Protocol::Base Related Software