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.10 by elmex, Mon May 29 20:22:33 2006 UTC vs.
Revision 1.13 by root, Wed May 31 07:40:33 2006 UTC

339 339
340 $prompt = $LAST_QUERY unless length $prompt; 340 $prompt = $LAST_QUERY unless length $prompt;
341 $LAST_QUERY = $prompt; 341 $LAST_QUERY = $prompt;
342 342
343 my $dialog = new CFClient::UI::FancyFrame 343 my $dialog = new CFClient::UI::FancyFrame
344 x => "center",
345 y => "center",
344 title => "Query", 346 title => "Query",
345 child => my $vbox = new CFClient::UI::VBox, 347 child => my $vbox = new CFClient::UI::VBox,
346 on_visibility_change => sub {
347 my ($self, $visible) = @_;
348 $self->center if $visible;
349 },
350 ; 348 ;
351 349
352 $vbox->add (new CFClient::UI::Label 350 $vbox->add (new CFClient::UI::Label
353 max_w => $::WIDTH * 0.4, 351 max_w => $::WIDTH * 0.4,
354 ellipsise => 0, 352 ellipsise => 0,
458} 456}
459 457
460sub addme_success { 458sub addme_success {
461 my ($self) = @_; 459 my ($self) = @_;
462 460
463 $self->send ("command output-sync $::CFG->{output_sync}");
464 $self->send ("command output-count $::CFG->{output_count}");
465
466 my $parser = new Pod::POM; 461 my $parser = new Pod::POM;
467 my $pod = $parser->parse_file (CFClient::find_rcfile "pod/skill_help.pod"); 462 my $pod = $parser->parse_file (CFClient::find_rcfile "pod/skill_help.pod");
468 463
469 my %skill_tooltip; 464 my %skill_tooltip;
470 465
606 if ($tag == 0) { 601 if ($tag == 0) {
607 update_floorbox; 602 update_floorbox;
608 update_container (0); 603 update_container (0);
609 } elsif ($tag == $self->{player}{tag}) { 604 } elsif ($tag == $self->{player}{tag}) {
610 $::INV->set_items ($self->{container}{$tag}) 605 $::INV->set_items ($self->{container}{$tag})
606 } else {
607 update_container ($tag);
611 } 608 }
612 609
613# use PApp::Util; warn PApp::Util::dumpval $self->{container}{0}; 610# use PApp::Util; warn PApp::Util::dumpval $self->{container}{0};
614} 611}
615 612
623 update_floorbox; 620 update_floorbox;
624 update_container ($_->{tag}); 621 update_container ($_->{tag});
625 } elsif ($_->{container} == $self->{player}{tag}) { 622 } elsif ($_->{container} == $self->{player}{tag}) {
626 $::INV->set_items ($self->{container}{$self->{player}{tag}}) 623 $::INV->set_items ($self->{container}{$self->{player}{tag}})
627 } else { 624 } else {
628 update_container ($_->{tag}); 625 update_container ($_->{container});
629 } 626 }
630 } 627 }
631} 628}
632 629
633sub item_update { 630sub item_update {
658} 655}
659 656
660sub player_update { 657sub player_update {
661 my ($self, $player) = @_; 658 my ($self, $player) = @_;
662 $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000); 659 $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000);
660
661 # do it here because it is ignored earlier, and there is no "login" event
662 $self->send_command ("output-sync $::CFG->{output_sync}");
663 $self->send_command ("output-count $::CFG->{output_count}");
663} 664}
664 665
6651; 6661;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines