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.3 by elmex, Fri May 26 19:34:30 2006 UTC vs.
Revision 1.6 by root, Sat May 27 19:49:07 2006 UTC

25 25
26 my $cmd = $1; 26 my $cmd = $1;
27 my @args = split /\|/, $2; 27 my @args = split /\|/, $2;
28 @args = (".*") unless @args; 28 @args = (".*") unless @args;
29 29
30 $_ = $_ eq ".*" ? "" : " $_"
31 for @args;
32
30 my $text = CFClient::pod_to_pango $head2->content; 33 my $text = CFClient::pod_to_pango $head2->content;
31 34
32 for my $arg (@args) {
33 $arg = $arg eq ".*" ? "" : " $arg";
34
35 $self->{map_widget}->add_command ("$cmd$arg", $text); 35 $self->{map_widget}->add_command ("$cmd$_", $text)
36 } 36 for sort { (length $a) <=> (length $b) }
37 @args;
37 } 38 }
38 39
39 $self->{noface} = new_from_file CFClient::Texture 40 $self->{noface} = new_from_file CFClient::Texture
40 CFClient::find_rcfile "noface.png", minify => 1, mipmap => 1; 41 CFClient::find_rcfile "noface.png", minify => 1, mipmap => 1;
41 42
52} 53}
53 54
54sub stats_update { 55sub stats_update {
55 my ($self, $stats) = @_; 56 my ($self, $stats) = @_;
56 57
57 if (my $exp = $stats->{CS_STAT_EXP64}) { 58 if (my $exp = $stats->{+CS_STAT_EXP64}) {
58 my $diff = $exp - $self->{prev_exp}; 59 my $diff = $exp - $self->{prev_exp};
59 $self->{statusbox}->add ("$diff experience gained", group => "experience $diff", fg => [0.5, 1, 0.5, 0.8], timeout => 5) 60 $self->{statusbox}->add ("$diff experience gained", group => "experience $diff", fg => [0.5, 1, 0.5, 0.8], timeout => 5)
60 if exists $self->{prev_exp} && $diff; 61 if exists $self->{prev_exp} && $diff;
61 $self->{prev_exp} = $exp; 62 $self->{prev_exp} = $exp;
62 } 63 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines