Mercurial > eagle-eye
diff Ikariam.pm @ 100:ed6160630329
save actionPoints.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 29 Oct 2008 03:20:53 +0800 |
parents | 34749e907405 |
children | 592d3b3b7898 |
line wrap: on
line diff
--- a/Ikariam.pm Wed Oct 29 02:49:55 2008 +0800 +++ b/Ikariam.pm Wed Oct 29 03:20:53 2008 +0800 @@ -609,6 +609,12 @@ $self->{'cities'}->{$cityId}->{"growth"} = $values[0]; $self->{'cities'}->{$cityId}->{"incomegold"} = $values[1]; + my $actionPoints = $extractor->find('//div[@id="CityOverview"]//li[@class="actions"]/text()'); + if($actionPoints =~ /(\d+)\/(\d+)/) { + $self->{'cities'}->{$cityId}->{actionPoints} = $1; + $self->{'cities'}->{$cityId}->{maxActionPoints} = $2; + } + $self->{'cities'}->{$cityId}->{corruption} = $extractor->find('//li[@class="corruption"]//span[@title="目前腐敗程度"]'); $self->{'cities'}->{$cityId}->{corruption} =~ s/%//g;