… | |
… | |
122 | $self->tile_path (3, sprintf "/world/world_%03d_%03d", $x - 1, $y) if $x > 0; |
122 | $self->tile_path (3, sprintf "/world/world_%03d_%03d", $x - 1, $y) if $x > 0; |
123 | |
123 | |
124 | $self->{load_path} = sprintf "%s/world-overlay/world_%03d_%03d.map", $cf::MAPDIR, $x, $y |
124 | $self->{load_path} = sprintf "%s/world-overlay/world_%03d_%03d.map", $cf::MAPDIR, $x, $y |
125 | if $x >= 100 && $x <= 129 && $y >= 100 && $y <= 129; |
125 | if $x >= 100 && $x <= 129 && $y >= 100 && $y <= 129; |
126 | |
126 | |
|
|
127 | $self->{need_create_treasure} = 1; |
|
|
128 | |
127 | 1 |
129 | 1 |
128 | } |
130 | } |
129 | |
131 | |
130 | sub fill { |
132 | sub fill { |
131 | my ($self) = @_; |
133 | my ($self) = @_; |
… | |
… | |
162 | $self->set_regiondata ($WORLD->{reg_data}, $top, $stride, $WORLD->{reg_plt}); |
164 | $self->set_regiondata ($WORLD->{reg_data}, $top, $stride, $WORLD->{reg_plt}); |
163 | |
165 | |
164 | } else { |
166 | } else { |
165 | $self->fill; |
167 | $self->fill; |
166 | } |
168 | } |
|
|
169 | |
|
|
170 | $self->create_region_treasure |
|
|
171 | if delete $self->{need_create_treasure}; |
167 | } |
172 | } |
168 | |
173 | |
169 | 1 |
174 | 1 |
170 | |
175 | |