ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.446 by root, Tue Sep 16 16:03:02 2008 UTC vs.
Revision 1.447 by root, Fri Sep 19 01:39:45 2008 UTC

730 730
731############################################################################# 731#############################################################################
732 732
733=head2 ATTACHABLE OBJECTS 733=head2 ATTACHABLE OBJECTS
734 734
735Many objects in crossfire are so-called attachable objects. That means you can 735Many objects in deliantra are so-called attachable objects. That means you can
736attach callbacks/event handlers (a collection of which is called an "attachment") 736attach callbacks/event handlers (a collection of which is called an "attachment")
737to it. All such attachable objects support the following methods. 737to it. All such attachable objects support the following methods.
738 738
739In the following description, CLASS can be any of C<global>, C<object> 739In the following description, CLASS can be any of C<global>, C<object>
740C<player>, C<client> or C<map> (i.e. the attachable objects in 740C<player>, C<client> or C<map> (i.e. the attachable objects in
790=item cf::CLASS::attachment $name, ... 790=item cf::CLASS::attachment $name, ...
791 791
792Register an attachment by C<$name> through which attachable objects of the 792Register an attachment by C<$name> through which attachable objects of the
793given CLASS can refer to this attachment. 793given CLASS can refer to this attachment.
794 794
795Some classes such as crossfire maps and objects can specify attachments 795Some classes such as deliantra maps and objects can specify attachments
796that are attached at load/instantiate time, thus the need for a name. 796that are attached at load/instantiate time, thus the need for a name.
797 797
798These calls expect any number of the following handler/hook descriptions: 798These calls expect any number of the following handler/hook descriptions:
799 799
800=over 4 800=over 4
1388 1388
1389=back 1389=back
1390 1390
1391=head2 CORE EXTENSIONS 1391=head2 CORE EXTENSIONS
1392 1392
1393Functions and methods that extend core crossfire objects. 1393Functions and methods that extend core deliantra objects.
1394 1394
1395=cut 1395=cut
1396 1396
1397package cf::player; 1397package cf::player;
1398 1398
1622 } 1622 }
1623 1623
1624 \@paths 1624 \@paths
1625} 1625}
1626 1626
1627=item $protocol_xml = $player->expand_cfpod ($crossfire_pod) 1627=item $protocol_xml = $player->expand_cfpod ($cfpod)
1628 1628
1629Expand crossfire pod fragments into protocol xml. 1629Expand deliantra pod fragments into protocol xml.
1630 1630
1631=item $player->ext_reply ($msgid, @msg) 1631=item $player->ext_reply ($msgid, @msg)
1632 1632
1633Sends an ext reply to the player. 1633Sends an ext reply to the player.
1634 1634
2692 $self->contr->savebed ($map, $x, $y) 2692 $self->contr->savebed ($map, $x, $y)
2693 if $exit->flag (cf::FLAG_DAMNED); 2693 if $exit->flag (cf::FLAG_DAMNED);
2694 2694
2695 1 2695 1
2696 }) { 2696 }) {
2697 $self->message ("Something went wrong deep within the crossfire server. " 2697 $self->message ("Something went wrong deep within the deliantra server. "
2698 . "I'll try to bring you back to the map you were before. " 2698 . "I'll try to bring you back to the map you were before. "
2699 . "Please report this to the dungeon master!", 2699 . "Please report this to the dungeon master!",
2700 cf::NDI_UNIQUE | cf::NDI_RED); 2700 cf::NDI_UNIQUE | cf::NDI_RED);
2701 2701
2702 warn "ERROR in enter_exit: $@"; 2702 warn "ERROR in enter_exit: $@";
2791); 2791);
2792 2792
2793sub cf::client::send_msg { 2793sub cf::client::send_msg {
2794 my ($self, $channel, $msg, $color, @extra) = @_; 2794 my ($self, $channel, $msg, $color, @extra) = @_;
2795 2795
2796 $msg = $self->pl->expand_cfpod ($msg); 2796 $msg = $self->pl->expand_cfpod ($msg)
2797 unless $color & cf::NDI_VERBATIM;
2797 2798
2798 $color &= cf::NDI_CLIENT_MASK; # just in case... 2799 $color &= cf::NDI_CLIENT_MASK; # just in case...
2799 2800
2800 # check predefined channels, for the benefit of C 2801 # check predefined channels, for the benefit of C
2801 if ($CHANNEL{$channel}) { 2802 if ($CHANNEL{$channel}) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines