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

Comparing deliantra/server/ext/rent.ext (file contents):
Revision 1.12 by root, Wed Nov 14 08:09:46 2007 UTC vs.
Revision 1.19 by root, Fri Oct 30 03:16:27 2009 UTC

4 4
5my %apartment = ( 5my %apartment = (
6 "/scorn/apartment/apartments" => [ 1, "scorn", "skorn"], 6 "/scorn/apartment/apartments" => [ 1, "scorn", "skorn"],
7 "/santo_dominion/sdomino_appartment" => [ 10, "santo dominion", "domino"], 7 "/santo_dominion/sdomino_appartment" => [ 10, "santo dominion", "domino"],
8 "/darcap/darcap/apartment" => [ 30, "darcap", "thecap"], 8 "/darcap/darcap/apartment" => [ 30, "darcap", "thecap"],
9 "/gotischerbereich/steinwandstadt/sapartment1" => [ 100, "steinwandstadt", "konkret"],
10 "/celvear_port/tower2/tower2" => [ 150, "celvear port", "kevlar"],
9 "/navar_city/apartments/apartment" => [ 250, "navar", "navar"], 11 "/navar_city/apartments/apartment" => [ 250, "navar", "navar"],
10 "/azumauindo/ranbounagisatoshi/apartments/sapartment" => [ 100, "乱暴渚都市", "benjo"], 12 "/azumauindo/ranbounagisatoshi/apartments/sapartment" => [ 100, "乱暴渚都市", "benjo"],
11 "/azumauindo/suno-yamatoshi/apartments/lapartment1" => [ 1000, "スノー大和島根", "sama"], 13 "/azumauindo/suno-yamatoshi/apartments/lapartment1" => [ 1000, "スノー大和島根", "sama"],
14 "/elmex/jeweler/jeweler_inn_upper" => [ 500, "jeweler town", "jewelor"],
12 "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"], 15 "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"],
16 "/lostwages/petapartment" => [ 5000, "lostwages", "losvegas"],
17 "/gotischerbereich/towerapartment/tower1" => [10000, "gotisch", "risen"],
18 "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"],
13 "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], 19 "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"],
14 "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"],
15); 20);
16 21
17# we have to special case some special cases :) 22# we have to special case some special cases :)
18sub reject_entry { 23sub reject_entry {
19 my ($pl) = @_; 24 my ($pl) = @_;
91 my ($pl, $types) = @_; 96 my ($pl, $types) = @_;
92 97
93 while (my ($k, $v) = each %apartment) { 98 while (my ($k, $v) = each %apartment) {
94 my $type = exists $pl->{rent}{apartment}{$k} ? 1 : 2; 99 my $type = exists $pl->{rent}{apartment}{$k} ? 1 : 2;
95 100
96 $pl->ob->reply (undef, "model \"$v->[2]\", situated in $v->[1] (" 101 $pl->ob->reply (undef, "model \"$v->[2]\", located in $v->[1] ("
97 . (cf::cost_string_from_value $v->[0]) . "/hr)\n") 102 . (cf::cost_string_from_value $v->[0]) . "/hr)\n")
98 if $type & $types; 103 if $type & $types;
99 } 104 }
100}; 105};
101 106
145 $pl->{rent}{last_offline_check} ||= time; 150 $pl->{rent}{last_offline_check} ||= time;
146 151
147 if ($pl->{rent}{last_online_check}) { 152 if ($pl->{rent}{last_online_check}) {
148 $pl->{rent}{last_online_check} = time 153 $pl->{rent}{last_online_check} = time
149 - List::Util::min 3600, 154 - List::Util::min 3600,
150 $pl->ob->get_ob_key_value ("schmorplog_last_save") - $pl->{rent}{last_online_check}; 155 $pl->ob->kv_get ("schmorplog_last_save") - $pl->{rent}{last_online_check};
151 } else { 156 } else {
152 $pl->{rent}{last_online_check} = time; 157 $pl->{rent}{last_online_check} = time;
153 } 158 }
154 159
155 update_balance $pl; 160 update_balance $pl;
177 182
178 return; 183 return;
179 } 184 }
180 } 185 }
181 186
182 $pl->ob->reply (undef, "Your highness, you have to rent this apartment in The Apartment Shop in Scorn first!"); 187 $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; 188 reject_entry $pl;
184 } 189 }
185 }, 190 },
186; 191;
187 192

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines