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.190 by root, Tue Mar 25 19:21:33 2008 UTC vs.
Revision 1.194 by root, Mon May 5 20:22:03 2008 UTC

27 ); 27 );
28 28
29 $self->{map_widget}->clr_commands; 29 $self->{map_widget}->clr_commands;
30 30
31 my @cmd_help = map { 31 my @cmd_help = map {
32 $_->{kw}[0] =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x 32 $_->[DC::Pod::N_KW][0] =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x
33 or die "unparseable command help: $_->{kw}[0]"; 33 or die "unparseable command help: $_->[DC::Pod::N_KW][0]";
34 34
35 my $cmd = $1; 35 my $cmd = $1;
36 my @args = split /\|/, $2; 36 my @args = split /\|/, $2;
37 @args = (".*") unless @args; 37 @args = (".*") unless @args;
38 38
43 for @args; 43 for @args;
44 44
45 map ["$cmd$_", $text], 45 map ["$cmd$_", $text],
46 sort { (length $a) <=> (length $b) } 46 sort { (length $a) <=> (length $b) }
47 @args 47 @args
48 } sort { $a->{par} <=> $b->{par} } 48 } sort { $a->[DC::Pod::N_PAR] <=> $b->[DC::Pod::N_PAR] }
49 DC::Pod::find command => "*"; 49 DC::Pod::find command => "*";
50 50
51 $self->{json_coder} 51 $self->{json_coder}
52 ->convert_blessed 52 ->convert_blessed
53 ->filter_json_single_key_object ("\fw" => sub { 53 ->filter_json_single_key_object ("\fw" => sub {
1170 $::FLOORBOX->clear; 1170 $::FLOORBOX->clear;
1171 1171
1172 my @add; 1172 my @add;
1173 1173
1174 my $row; 1174 my $row;
1175 for (sort { $a->{count} <=> $b->{count} } values %{ $::CONN->{container}{$::CONN->{open_container} || 0} }) { 1175 for (sort { $b->{count} <=> $a->{count} } values %{ $::CONN->{container}{$::CONN->{open_container} || 0} }) {
1176 next if $_->{tag} & 0x80000000;
1176 if ($row < 6) { 1177 if ($row < 6) {
1177 local $_->{face_widget}; # hack to force recreation of widget 1178 local $_->{face_widget}; # hack to force recreation of widget
1178 local $_->{desc_widget}; # hack to force recreation of widget 1179 local $_->{desc_widget}; # hack to force recreation of widget
1179 DC::Item::update_widgets $_; 1180 DC::Item::update_widgets $_;
1180 1181
1273} 1274}
1274 1275
1275sub item_update { 1276sub item_update {
1276 my ($self, $item) = @_; 1277 my ($self, $item) = @_;
1277 1278
1278 #d# print "item_update: $item->{tag} in $item->{container} ($self->{player}{tag}) ($::CONN->{open_container})\n"; 1279 #print "item_update: $item->{tag} in $item->{container} pt($self->{player}{tag}) oc($::CONN->{open_container}) f($item->{flags})\n";
1279 1280
1280 DC::Item::update_widgets $item; 1281 DC::Item::update_widgets $item;
1281 1282
1282 if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) { 1283 if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) {
1283 set_opencont ($::CONN, 0, "Floor"); 1284 set_opencont ($::CONN, 0, "Floor");
1284 1285
1285 } elsif ($item->{flags} & F_OPEN) { 1286 } elsif ($item->{flags} & F_OPEN) {
1286 set_opencont ($::CONN, $item->{tag}, DC::Item::desc_string $item); 1287 set_opencont ($::CONN, $item->{tag}, DC::Item::desc_string $item);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines