… | |
… | |
10 | "/azumauindo/ranbounagisatoshi/apartments/sapartment" => [ 100, "乱暴渚都市", "benjo"], |
10 | "/azumauindo/ranbounagisatoshi/apartments/sapartment" => [ 100, "乱暴渚都市", "benjo"], |
11 | "/azumauindo/suno-yamatoshi/apartments/lapartment1" => [ 1000, "スノー大和島根", "sama"], |
11 | "/azumauindo/suno-yamatoshi/apartments/lapartment1" => [ 1000, "スノー大和島根", "sama"], |
12 | "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"], |
12 | "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"], |
13 | "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], |
13 | "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], |
14 | "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"], |
14 | "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"], |
|
|
15 | "/elmex/jeweler/jeweler_inn_upper" => [ 500, "jeweler town", "jewelor"], |
15 | ); |
16 | ); |
16 | |
17 | |
17 | # we have to special case some special cases :) |
18 | # we have to special case some special cases :) |
18 | sub reject_entry { |
19 | sub reject_entry { |
19 | my ($pl) = @_; |
20 | my ($pl) = @_; |
… | |
… | |
145 | $pl->{rent}{last_offline_check} ||= time; |
146 | $pl->{rent}{last_offline_check} ||= time; |
146 | |
147 | |
147 | if ($pl->{rent}{last_online_check}) { |
148 | if ($pl->{rent}{last_online_check}) { |
148 | $pl->{rent}{last_online_check} = time |
149 | $pl->{rent}{last_online_check} = time |
149 | - List::Util::min 3600, |
150 | - List::Util::min 3600, |
150 | $pl->ob->get_ob_key_value ("schmorplog_last_save") - $pl->{rent}{last_online_check}; |
151 | $pl->ob->kv_get ("schmorplog_last_save") - $pl->{rent}{last_online_check}; |
151 | } else { |
152 | } else { |
152 | $pl->{rent}{last_online_check} = time; |
153 | $pl->{rent}{last_online_check} = time; |
153 | } |
154 | } |
154 | |
155 | |
155 | update_balance $pl; |
156 | update_balance $pl; |
… | |
… | |
177 | |
178 | |
178 | return; |
179 | return; |
179 | } |
180 | } |
180 | } |
181 | } |
181 | |
182 | |
182 | $pl->ob->reply (undef, "Your highness, you have to rent this apartment in The Apartment Shop in Scorn first!"); |
183 | $pl->ob->reply (undef, "Your highness, you have to rent this apartment in The Apartment Shop in Scorn or other apartment shops first!"); |
183 | reject_entry $pl; |
184 | reject_entry $pl; |
184 | } |
185 | } |
185 | }, |
186 | }, |
186 | ; |
187 | ; |
187 | |
188 | |
188 | our $RENT_TIMER = Event->timer ( |
189 | our $RENT_TIMER = cf::periodic 3600, Coro::unblock_sub { |
189 | reentrant => 0, |
|
|
190 | after => 60, |
|
|
191 | interval => 3600, |
|
|
192 | data => cf::WF_AUTOCANCEL, |
|
|
193 | cb => Coro::unblock_sub { |
|
|
194 | pay_balance $_ for cf::player::list; |
190 | pay_balance $_ for cf::player::list; |
195 | }, |
191 | }; |
196 | ); |
|
|
197 | |
192 | |