ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/rent.ext
(Generate patch)

Comparing deliantra/maps/perl/rent.ext (file contents):
Revision 1.4 by root, Tue Sep 19 15:15:36 2006 UTC vs.
Revision 1.6 by root, Tue Sep 19 20:14:16 2006 UTC

31 my ($pl) = @_; 31 my ($pl) = @_;
32 32
33 cf::override; 33 cf::override;
34 34
35 teleport $pl, "/world/world_105_115", 2, 34 35 teleport $pl, "/world/world_105_115", 2, 34
36 unless
37 $pl->ob->map
36 unless $pl->ob->map && $pl->ob->map->path !~ /nimbus/; 38 && $pl->ob->map->path !~ /nimbus/
39 && $pl->ob->map->path !~ m%/var/crossfire/players/%;
37} 40}
38 41
39sub update_balance { 42sub update_balance {
40 my ($pl) = @_; 43 my ($pl) = @_;
41 44
169 172
170cf::register_map_attachment rent => 173cf::register_map_attachment rent =>
171 on_enter => sub { 174 on_enter => sub {
172 my ($map, $pl, $x, $y) = @_; 175 my ($map, $pl, $x, $y) = @_;
173 176
177 # can freely enter homes of other people
178 {
179 my $path = sprintf "%s/%s/%s/",
180 cf::localdir, cf::playerdir, $pl->ob->name;
181
182 return if $path ne substr $map->path, 0, length $path;
183 }
184
174 for my $path (keys %{ $pl->{rent}{apartment} }) { 185 for my $path (keys %{ $pl->{rent}{apartment} }) {
175 $path =~ y/\//_/; 186 $path =~ y/\//_/;
176 $path = sprintf "%s/%s/%s/%s", 187 $path = sprintf "%s/%s/%s/%s",
177 cf::localdir, cf::playerdir, $pl->ob->name, $path; 188 cf::localdir, cf::playerdir, $pl->ob->name, $path;
178 189

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines