ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.86 by root, Sun Oct 8 21:22:30 2006 UTC vs.
Revision 1.88 by root, Sun Nov 19 20:31:29 2006 UTC

6use Crossfire::Protocol::Constants; 6use Crossfire::Protocol::Constants;
7 7
8use CFPlus; 8use CFPlus;
9use CFPlus::UI; 9use CFPlus::UI;
10use CFPlus::Pod; 10use CFPlus::Pod;
11
12use Crossfire::Protocol::Base 0.95;
11 13
12use base 'Crossfire::Protocol::Base'; 14use base 'Crossfire::Protocol::Base';
13 15
14sub new { 16sub new {
15 my $class = shift; 17 my $class = shift;
319} 321}
320 322
321sub user_send { 323sub user_send {
322 my ($self, $command) = @_; 324 my ($self, $command) = @_;
323 325
324 if ($self->{record}) {
325 push @{$self->{record}}, $command; 326 push @{$self->{record}}, $command
326 } 327 if $self->{record};
327 328
328 $self->logprint ("send: ", $command); 329 $self->logprint ("send: ", $command);
329 $self->send_command ($command); 330 $self->send_command ($command);
330 ::status ($command); 331 ::status ($command);
331} 332}
655 # try to create single paragraphs out of the multiple lines sent by the server 656 # try to create single paragraphs out of the multiple lines sent by the server
656 $spell->{message} =~ s/(?<=\S)\n(?=\w)/ /g; 657 $spell->{message} =~ s/(?<=\S)\n(?=\w)/ /g;
657 $spell->{message} =~ s/\n+$//; 658 $spell->{message} =~ s/\n+$//;
658 $spell->{message} ||= "Server did not provide a description for this spell."; 659 $spell->{message} ||= "Server did not provide a description for this spell.";
659 660
660 $::SPELL_PAGE->add_spell ($spell); 661 $::SPELL_LIST->add_spell ($spell);
661 662
662 $self->{map_widget}->add_command ("invoke $spell->{name}", CFPlus::asxml $spell->{message}); 663 $self->{map_widget}->add_command ("invoke $spell->{name}", CFPlus::asxml $spell->{message});
663 $self->{map_widget}->add_command ("cast $spell->{name}", CFPlus::asxml $spell->{message}); 664 $self->{map_widget}->add_command ("cast $spell->{name}", CFPlus::asxml $spell->{message});
664} 665}
665 666
666sub spell_delete { 667sub spell_delete {
667 my ($self, $spell) = @_; 668 my ($self, $spell) = @_;
668 669
669 $::SPELL_PAGE->remove_spell ($spell); 670 $::SPELL_LIST->remove_spell ($spell);
671}
672
673sub setup {
674 my ($self, $setup) = @_;
675
676 $::MAP->resize ($self->{mapw}, $self->{maph});
670} 677}
671 678
672sub addme_success { 679sub addme_success {
673 my ($self) = @_; 680 my ($self) = @_;
674 681

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines