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.162 by root, Wed Aug 22 21:14:06 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 };
562 } 562 }
563 563
564 $sktbl->add_at (@add); 564 $sktbl->add_at (@add);
565 } 565 }
566 566
567 for (grep exists $stats->{$_}, @skills) { 567 for (@order) {
568 next if $prev->{$_} == $stats->{$_}; 568 my ($idx, $name) = @$_;
569 my $val = $stats->{$idx};
569 570
571 next if $prev->{$idx}[1] eq $val->[1];
572
570 my $sw = $self->{skillwid}{$_}; 573 my $sw = $self->{skillwid}{$idx};
571 $sw->[0]->set_text (::formsep ($stats->{$_}[1])); 574 $sw->[0]->set_text (::formsep ($val->[1]));
572 $sw->[1]->set_text ($stats->{$_}[0] * 1); 575 $sw->[1]->set_text ($val->[0] * 1);
573 $sw->[2]->set_value (@{$stats->{$_}}); 576 $sw->[2]->set_value (@$val);
574 }
575}
576 577
577sub macro_send { 578 $::GAUGES->{sklprg}->set_label ("$name %d%%");
578 my ($self, $macro) = @_; 579 $::GAUGES->{sklprg}->set_value (@$val);
579
580 for my $cmd (@{ $macro->{action} }) {
581 $self->send_command ($cmd);
582 } 580 }
583} 581}
584 582
585sub user_send { 583sub user_send {
586 my ($self, $command) = @_; 584 my ($self, $command) = @_;
588 $self->{record}->($command) 586 $self->{record}->($command)
589 if $self->{record}; 587 if $self->{record};
590 588
591 $self->logprint ("send: ", $command); 589 $self->logprint ("send: ", $command);
592 $self->send_command ($command); 590 $self->send_command ($command);
593 ::status ($command);
594} 591}
595 592
596sub record { 593sub record {
597 my ($self, $cb) = @_; 594 my ($self, $cb) = @_;
598 595

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines