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.163 by root, Wed Aug 22 21:17:32 2007 UTC vs.
Revision 1.167 by root, Tue Aug 28 01:23:47 2007 UTC

401 401
402 if ( 402 if (
403 my @diffs = map $_->[1]->($self, $_->[2], $prev->{$_->[0]}, $stats->{$_->[0]}), @statchange 403 my @diffs = map $_->[1]->($self, $_->[2], $prev->{$_->[0]}, $stats->{$_->[0]}), @statchange
404 ) { 404 ) {
405 my $msg = "<b>stat change</b>: " . (join " ", @diffs); 405 my $msg = "<b>stat change</b>: " . (join " ", @diffs);
406 $self->{statusbox}->add ($msg, group => "stat $msg", fg => [0.8, 1, 0.2, 1], timeout => 10); 406 $self->{statusbox}->add ($msg, group => "stat $msg", fg => [0.8, 1, 0.2, 1], timeout => 20);
407 } 407 }
408 408
409 $self->update_stats_window ($stats, $prev); 409 $self->update_stats_window ($stats, $prev);
410 410
411 $self->{prev_stats} = { %$stats }; 411 $self->{prev_stats} = { %$stats };
566 566
567 for (@order) { 567 for (@order) {
568 my ($idx, $name) = @$_; 568 my ($idx, $name) = @$_;
569 my $val = $stats->{$idx}; 569 my $val = $stats->{$idx};
570 570
571 next if $prev->{$idx}[1] == $val->[1]; 571 next if $prev->{$idx}[1] eq $val->[1];
572 572
573 my $sw = $self->{skillwid}{$idx}; 573 my $sw = $self->{skillwid}{$idx};
574 $sw->[0]->set_text (::formsep ($val->[1])); 574 $sw->[0]->set_text (::formsep ($val->[1]));
575 $sw->[1]->set_text ($val->[0] * 1); 575 $sw->[1]->set_text ($val->[0] * 1);
576 $sw->[2]->set_value (@$val); 576 $sw->[2]->set_value (@$val);
577 577
578 #$::GAUGES->{sklprg}->set_label ($name); 578 $::GAUGES->{sklprg}->set_label ("$name %d%%");
579 $::GAUGES->{sklprg}->set_value (@$val); 579 $::GAUGES->{sklprg}->set_value (@$val);
580 }
581}
582
583sub macro_send {
584 my ($self, $macro) = @_;
585
586 for my $cmd (@{ $macro->{action} }) {
587 $self->send_command ($cmd);
588 } 580 }
589} 581}
590 582
591sub user_send { 583sub user_send {
592 my ($self, $command) = @_; 584 my ($self, $command) = @_;
594 $self->{record}->($command) 586 $self->{record}->($command)
595 if $self->{record}; 587 if $self->{record};
596 588
597 $self->logprint ("send: ", $command); 589 $self->logprint ("send: ", $command);
598 $self->send_command ($command); 590 $self->send_command ($command);
599 ::status ($command);
600} 591}
601 592
602sub record { 593sub record {
603 my ($self, $cb) = @_; 594 my ($self, $cb) = @_;
604 595

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines