ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-tags.ext
(Generate patch)

Comparing deliantra/server/ext/map-tags.ext (file contents):
Revision 1.3 by root, Tue Sep 11 15:33:34 2007 UTC vs.
Revision 1.4 by root, Tue Sep 11 15:40:01 2007 UTC

152}; 152};
153 153
154sub find($) { 154sub find($) {
155 my ($tag) = @_; 155 my ($tag) = @_;
156 156
157 my @res;
158
159 utf8::encode (my $key = $tag); 157 utf8::encode (my $key = $tag);
160 BDB::db_get $db_target, undef, $key, my $data; 158 BDB::db_get $db_target, undef, $key, my $data;
161 utf8::decode $data; 159 utf8::decode $data;
162 160
163 for my $map ( 161 map { $_->load; $_->find_tagged_objects ($tag) }
164 grep $_, 162 grep $_,
165 map { cf::map::find $_ } 163 map { cf::map::find $_ }
166 grep s/^s//, 164 grep s/^s//,
167 split /\x00/, $data 165 split /\x00/, $data
168 ) {
169 warn "map $map,$tag\n";#d#
170 $map->load;
171
172 push @res, $map->find_tagged_objects ($tag);
173
174 warn "tag<$tag>map<$map>res<@res>\n";#d#
175 }
176
177 @res
178} 166}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines