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.192 by root, Thu Mar 27 20:42:23 2008 UTC vs.
Revision 1.195 by root, Thu May 8 20:19:49 2008 UTC

1026 1026
1027 # handle some elements 1027 # handle some elements
1028 s/<fg name='([^']*)'>(.*?)<\/fg>/<span foreground='$1'>$2<\/span>/gs; 1028 s/<fg name='([^']*)'>(.*?)<\/fg>/<span foreground='$1'>$2<\/span>/gs;
1029 s/<fg name="([^"]*)">(.*?)<\/fg>/<span foreground="$1">$2<\/span>/gs; 1029 s/<fg name="([^"]*)">(.*?)<\/fg>/<span foreground="$1">$2<\/span>/gs;
1030 1030
1031 s/\s+$//;
1032
1031 $_ 1033 $_
1032} 1034}
1033 1035
1034our %NAME_TO_COLOR = ( 1036our %NAME_TO_COLOR = (
1035 black => 0, 1037 black => 0,
1170 $::FLOORBOX->clear; 1172 $::FLOORBOX->clear;
1171 1173
1172 my @add; 1174 my @add;
1173 1175
1174 my $row; 1176 my $row;
1175 for (sort { $a->{count} <=> $b->{count} } values %{ $::CONN->{container}{$::CONN->{open_container} || 0} }) { 1177 for (sort { $b->{count} <=> $a->{count} } values %{ $::CONN->{container}{$::CONN->{open_container} || 0} }) {
1178 next if $_->{tag} & 0x80000000;
1176 if ($row < 6) { 1179 if ($row < 6) {
1177 local $_->{face_widget}; # hack to force recreation of widget 1180 local $_->{face_widget}; # hack to force recreation of widget
1178 local $_->{desc_widget}; # hack to force recreation of widget 1181 local $_->{desc_widget}; # hack to force recreation of widget
1179 DC::Item::update_widgets $_; 1182 DC::Item::update_widgets $_;
1180 1183
1273} 1276}
1274 1277
1275sub item_update { 1278sub item_update {
1276 my ($self, $item) = @_; 1279 my ($self, $item) = @_;
1277 1280
1278 #d# print "item_update: $item->{tag} in $item->{container} ($self->{player}{tag}) ($::CONN->{open_container})\n"; 1281 #print "item_update: $item->{tag} in $item->{container} pt($self->{player}{tag}) oc($::CONN->{open_container}) f($item->{flags})\n";
1279 1282
1280 DC::Item::update_widgets $item; 1283 DC::Item::update_widgets $item;
1281 1284
1282 if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) { 1285 if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) {
1283 set_opencont ($::CONN, 0, "Floor"); 1286 set_opencont ($::CONN, 0, "Floor");
1284 1287
1285 } elsif ($item->{flags} & F_OPEN) { 1288 } elsif ($item->{flags} & F_OPEN) {
1286 set_opencont ($::CONN, $item->{tag}, DC::Item::desc_string $item); 1289 set_opencont ($::CONN, $item->{tag}, DC::Item::desc_string $item);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines