diff Ikariam.pm @ 28:99723b8f348b

added rule_corruption
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 10 Oct 2008 04:42:05 +0800
parents dd85b55eec2a
children dbec53e754e3
line wrap: on
line diff
--- a/Ikariam.pm	Fri Oct 10 03:38:49 2008 +0800
+++ b/Ikariam.pm	Fri Oct 10 04:42:05 2008 +0800
@@ -299,10 +299,11 @@
         }
 
         # Space, 房屋數
+        $self->{'cities'}->{$cityId}->{"space"} = {};
         foreach my $j (qw/occupied total/) {
             my ($elem) = $html->getElementsByAttribute("class", sprintf("value %s", $j));
             if(defined($elem)) {
-                $self->{'cities'}->{$cityId}->{"space_" . $j} = $elem->innerText();
+                $self->{'cities'}->{$cityId}->{"space"}->{$j} = $elem->innerText();
             }
         }