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.105 by root, Tue Apr 24 01:13:15 2007 UTC vs.
Revision 1.107 by root, Sun Jun 24 03:46:46 2007 UTC

249 $::GAUGES->{mana} ->set_value ($sp, $sp_m); 249 $::GAUGES->{mana} ->set_value ($sp, $sp_m);
250 $::GAUGES->{food} ->set_value ($fo, $fo_m); 250 $::GAUGES->{food} ->set_value ($fo, $fo_m);
251 $::GAUGES->{grace} ->set_value ($gr, $gr_m); 251 $::GAUGES->{grace} ->set_value ($gr, $gr_m);
252 $::GAUGES->{exp} ->set_text ("Exp: " . (::formsep ($stats->{+CS_STAT_EXP64})) 252 $::GAUGES->{exp} ->set_text ("Exp: " . (::formsep ($stats->{+CS_STAT_EXP64}))
253 . " (lvl " . ($stats->{+CS_STAT_LEVEL} * 1) . ")"); 253 . " (lvl " . ($stats->{+CS_STAT_LEVEL} * 1) . ")");
254 my $rng = $stats->{+CS_STAT_RANGE}; 254 $::GAUGES->{range} ->set_text ($stats->{+CS_STAT_RANGE});
255 $rng =~ s/^Range: //; # thank you so much dear server
256 $::GAUGES->{range} ->set_text ("Rng: " . $rng);
257 my $title = $stats->{+CS_STAT_TITLE}; 255 my $title = $stats->{+CS_STAT_TITLE};
258 $title =~ s/^Player: //; 256 $title =~ s/^Player: //;
259 $::STATWIDS->{title} ->set_text ("Title: " . $title); 257 $::STATWIDS->{title} ->set_text ("Title: " . $title);
260 258
261 $::STATWIDS->{st_str} ->set_text (sprintf "%d" , $stats->{+CS_STAT_STR}); 259 $::STATWIDS->{st_str} ->set_text (sprintf "%d" , $stats->{+CS_STAT_STR});
668 [0.74, 0.65, 0.41], 666 [0.74, 0.65, 0.41],
669); 667);
670 668
671sub msg { 669sub msg {
672 my ($self, $color, $type, $text, @extra) = @_; 670 my ($self, $color, $type, $text, @extra) = @_;
671
672 # we now weed out all tags we do not support
673 $text =~ s%<(?!/?i>|/?u>|/?b>|fg |/fg>)%&lt;%g;
674 # now all entities
675 $text =~ s/&(?!amp;|lt;|gt;|apos;|quot;|#[0-9]+;|#x[0-9a-fA-F]+;)/&amp;/g;
676
677 # handle some elements
678 $text =~ s/<fg name='([^']*)'>(.*?)<\/fg>/<span foreground='$1'>$2<\/span>/gs;
679 $text =~ s/<fg name="([^"]*)">(.*?)<\/fg>/<span foreground="$1">$2<\/span>/gs;
673 680
674 if (my $cb = $self->{cb_msg}{$type}) { 681 if (my $cb = $self->{cb_msg}{$type}) {
675 $_->($self, $color, $type, $text, @extra) for values %$cb; 682 $_->($self, $color, $type, $text, @extra) for values %$cb;
676 } elsif ($type =~ /^(?:chargen-race-title|chargen-race-description)$/) { 683 } elsif ($type =~ /^(?:chargen-race-title|chargen-race-description)$/) {
677 $type =~ s/-/_/g; 684 $type =~ s/-/_/g;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines