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.54 by root, Mon Jul 3 22:58:37 2006 UTC vs.
Revision 1.55 by root, Wed Jul 5 01:53:24 2006 UTC

651 651
652sub update_containers { 652sub update_containers {
653 my ($self) = @_; 653 my ($self) = @_;
654 654
655 $CFClient::UI::ROOT->on_refresh ("update_containers_$self" => sub { 655 $CFClient::UI::ROOT->on_refresh ("update_containers_$self" => sub {
656 for my $tag (keys %{ delete $self->{update_container} }) { 656 my $todo = delete $self->{update_container}
657 or return;
658
659 for my $tag (keys %$todo) {
657 if ($tag == 0) { 660 if ($tag == 0) {
658 update_floorbox; 661 update_floorbox;
659 $::INVR->set_items ($self->{container}{0}) 662 $::INVR->set_items ($self->{container}{0})
660 if $tag == $self->{open_container}; 663 if $tag == $self->{open_container};
661 } elsif ($tag == $self->{player}{tag}) { 664 } elsif ($tag == $self->{player}{tag}) {
705 set_opencont ($::CONN, $item->{tag}, CFClient::Item::desc_string $item); 708 set_opencont ($::CONN, $item->{tag}, CFClient::Item::desc_string $item);
706 709
707 } else { 710 } else {
708 $self->{update_container}{$item->{container}}++; 711 $self->{update_container}{$item->{container}}++;
709 $self->update_containers; 712 $self->update_containers;
710# if ($item->{container} == 0) {
711# update_floorbox;
712# update_container (0);
713# } elsif ($item->{container} == $self->{player}{tag}) {
714# $::INV->set_items ($self->{container}{$item->{container}})
715# }
716 } 713 }
717} 714}
718 715
719sub player_update { 716sub player_update {
720 my ($self, $player) = @_; 717 my ($self, $player) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines