# HG changeset patch # User "Rex Tsai " # Date 1234374652 -28800 # Node ID 484aaddeef6655e7ee6b90266da3b9d594627795 # Parent c29c8dad06734aaa92f35087d21f068b7bb1f6fb fixed the order of armies diff -r c29c8dad0673 -r 484aaddeef66 Ikariam.pm --- a/Ikariam.pm Thu Feb 12 01:24:59 2009 +0800 +++ b/Ikariam.pm Thu Feb 12 01:50:52 2009 +0800 @@ -1035,13 +1035,14 @@ my $cityId = shift; my %force_types; - $force_types{'army'} = [ qw/undef undef Slinger Swordsman Phalanx Ram Archer Catapult Gunsman Mortar SteamGiant Gyrocopter Bombardier Doctor Cook/ ]; - $force_types{'fleet'} = [ qw/undef undef Ram-Ship BallistaShip Flamethrower CatapultShip MortarShip PaddleWheelRam DivingBoat/ ]; + $force_types{'army'} = [ qw/undef undef Slinger Swordsman Phalanx Archer Gunsman Gyrocopter SteamGiant Bombardier Ram Catapult Mortar Doctor Cook/ ]; + $force_types{'fleet'} = [ qw/undef undef Ram-Ship BallistaShip Flamethrower CatapultShip PaddleWheelRam MortarShip DivingBoat/ ]; foreach my $x (qw/army fleet/) { $self->{'cities'}->{$cityId}->{$x} = {}; my $res = $self->{mech}->get(sprintf('http://%s/index.php?view=cityMilitary-%s&id=%d', $self->{server}, $x, $cityId)); my @numbers = Ikariam::Extractor->new(content => $res->content)->find('//table//tr/td'); + print(Dumper(@numbers)); foreach my $j (0..$#{$force_types{$x}}) { next if(!defined($force_types{$x}[$j])); if ($numbers[$j] == '-') { @@ -1051,6 +1052,7 @@ } } } + print(Dumper($self->{'cities'}->{$cityId}->{'army'})); } sub checkFriends