--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/13 14:35:17 1.34 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/18 17:13:11 1.38 @@ -85,8 +85,6 @@ $fh->flush; } - - sub stats_update { my ($self, $stats) = @_; @@ -136,6 +134,12 @@ $self->{map_widget}->update; } +sub magicmap { + my ($self, $w, $h, $x, $y, $data) = @_; + + $self->{map_widget}->set_magicmap ($w, $h, $x, $y, $data); +} + sub flush_map { my ($self) = @_; @@ -156,6 +160,7 @@ delete $self->{neigh_map}; $self->{map}->clear; + delete $self->{map_widget}{magicmap}; } @@ -308,7 +313,7 @@ my $txn = $CFClient::DB_ENV->txn_begin; my $status = $self->{facemap}->db_get (id => $id); if ($status == 0 || $status == BerkeleyDB::DB_NOTFOUND) { - $id = ($id || 16) + 1; + $id = ($id || 64) + 1; if ($self->{facemap}->put (id => $id) == 0 && $self->{facemap}->put ($hash => $id) == 0) { $txn->txn_commit; @@ -532,7 +537,7 @@ } else { $::FLOORBOX->add (1, $row, new CFClient::UI::Button text => "More...", - on_activate => sub { $::INV_WINDOW->toggle_visibility }, + on_activate => sub { $::INV_WINDOW->toggle_visibility; 0 }, ); last; } @@ -557,6 +562,7 @@ $::CONN->send ("apply $tag") # $::CONN->{open_container}") if $tag != 0; #if $CONN->{open_container} != 0; + 0 }, ); } @@ -758,6 +764,8 @@ $entry->set_text (""); $this->send ($text); + + 0 }, ); @@ -766,7 +774,7 @@ $self->{close_button} = new CFClient::UI::Button text => "Bye (close)", tooltip => "Use this button to end talking to the NPC. This also closes the dialog window.", - on_activate => sub { $this->destroy }, + on_activate => sub { $this->destroy; 0 }, ; $self->update_options; @@ -775,7 +783,7 @@ $self->{conn}->connect_ext ($self->{token} => sub { $this->feed (@_) }); $self->{conn}->send ("ext npc_dialog_begin $self->{token} $self->{dx} $self->{dy}"); - $self->{entry}->focus_in; + $self->{entry}->grab_focus; $self->{textview}->add_paragraph ([1, 1, 0, 1], "[starting conversation with $self->{title}]\n\n"); @@ -796,6 +804,7 @@ text => $kw, on_activate => sub { $self->send ($kw); + 0 }, ); }