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.26 by root, Wed Jun 7 05:54:09 2006 UTC vs.
Revision 1.27 by root, Wed Jun 7 07:00:30 2006 UTC

398} 398}
399 399
400sub spell_add { 400sub spell_add {
401 my ($self, $spell) = @_; 401 my ($self, $spell) = @_;
402 402
403 # TODO 403 # try to create single paragraphs of multiple lines sent by the server
404 # create a widget dynamically, using spell face (CF::Protocol downloads them) 404 $spell->{message} =~ s/(?<=\S)\n(?=\w)/ /g;
405 $spell->{message} =~ s/\n+$//;
406 $spell->{message} ||= "Server did not provide a description for this spell.";
407
405 $::SETUP_SPELLS->add_spell ($spell); 408 $::SETUP_SPELLS->add_spell ($spell);
406 409
407 $self->{map_widget}->add_command ("invoke $spell->{name}", CFClient::UI::Label::escape $spell->{message}); 410 $self->{map_widget}->add_command ("invoke $spell->{name}", CFClient::UI::Label::escape $spell->{message});
408 $self->{map_widget}->add_command ("cast $spell->{name}", CFClient::UI::Label::escape $spell->{message}); 411 $self->{map_widget}->add_command ("cast $spell->{name}", CFClient::UI::Label::escape $spell->{message});
409} 412}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines