--- deliantra/server/ext/map-world.ext 2007/04/18 14:24:09 1.22 +++ deliantra/server/ext/map-world.ext 2007/04/19 16:23:46 1.24 @@ -80,7 +80,7 @@ } sub reload() { - $WORLD = load_gridmap sprintf "%s/%s/%s", cf::datadir, cf::mapdir, "world"; + $WORLD = load_gridmap "$MAPDIR/world"; warn "worldmap gridmap loaded."; } @@ -90,7 +90,7 @@ cf::async_ext { reload; undef $guard; - } + }; }; cf::map->register (qr{^/world/world_(\d\d\d)_(\d\d\d)$}, 100); @@ -121,9 +121,11 @@ $self->tile_path (2, sprintf "/world/world_%03d_%03d", $x, $y + 1) if $y < 999; $self->tile_path (3, sprintf "/world/world_%03d_%03d", $x - 1, $y) if $x > 0; - $self->{load_path} = sprintf "%s/%s/world-overlay/world_%03d_%03d.map", cf::datadir, cf::mapdir, $x, $y + $self->{load_path} = sprintf "%s/world-overlay/world_%03d_%03d.map", $cf::MAPDIR, $x, $y if $x >= 100 && $x <= 129 && $y >= 100 && $y <= 129; + $self->{need_create_treasure} = 1; + 1 } @@ -164,6 +166,9 @@ } else { $self->fill; } + + $self->create_region_treasure + if delete $self->{need_create_treasure}; } 1