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

Comparing deliantra/server/ext/map_lib.ext (file contents):
Revision 1.6 by root, Mon Apr 21 06:35:26 2008 UTC vs.
Revision 1.7 by elmex, Sat Mar 20 14:57:58 2010 UTC

9 9
10sub rec_inv_by_slaying { 10sub rec_inv_by_slaying {
11 my ($ob, $slaying, $cb) = @_; 11 my ($ob, $slaying, $cb) = @_;
12 $cb->($ob) if $ob->slaying eq $slaying; 12 $cb->($ob) if $ob->slaying eq $slaying;
13 for my $iob ($ob->inv) { rec_inv_by_slaying ($iob, $slaying, $cb) } 13 for my $iob ($ob->inv) { rec_inv_by_slaying ($iob, $slaying, $cb) }
14}
15
16=item count_linked ($map, $connected)
17
18Counts the number of objects with the connected value C<$connected> on
19the map C<$map>.
20
21=cut
22
23sub count_linked {
24 my ($map, $connected) = @_;
25 my (@a) = $map->find_link ($connected);
26 scalar @a
14} 27}
15 28
16=item object attachment: 'check_inventory_on_apply' 29=item object attachment: 'check_inventory_on_apply'
17 30
18This attachment checks on apply whether the applyer 31This attachment checks on apply whether the applyer

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines