# HG changeset patch # User "Rex Tsai " # Date 1223441800 -28800 # Node ID e68f4cadfabd74febcf5171aeb6cfbc6ab7e0c1a # Parent 8b7bc598ba060ee4189136f59647717191506104 fixed the 假期模式 diff -r 8b7bc598ba06 -r e68f4cadfabd sheep.pl --- a/sheep.pl Wed Oct 08 12:18:50 2008 +0800 +++ b/sheep.pl Wed Oct 08 12:56:40 2008 +0800 @@ -15,7 +15,7 @@ AND island.x >= ? AND island.y <= ? AND island.y >= ? - AND user.status = 'i' + AND cities.status = 'i' } ); Ikariam::User->set_sql(sheeps => qq { @@ -38,7 +38,7 @@ my ($x, $y) = @ARGV; listSheeps(Ikariam::User->search_sheeps(($x + 6), ($x - 6), ($y + 6), ($y - 6))); -listSheeps(Ikariam::User->search_inactivity(($x + 6), ($x - 6), ($y + 6), ($y - 6))); +# listSheeps(Ikariam::User->search_inactivity(($x + 6), ($x - 6), ($y + 6), ($y - 6))); sub listSheeps { @@ -49,23 +49,24 @@ # avoid duplicate next if($sheep->id == $s); $s = $sheep->id; - # 假期模式 - next if($sheep->status eq 'v'); # 查聯盟數量 my $members = 1; - unless ($sheep->status eq 'i' || $sheep->allyId == '0') { + unless ($sheep->allyId == '0') { $members = Ikariam::User->search(allyId => $sheep->allyId)->count(); - next if($members > 3); } - # print Dumper($sheep->_data_hash); foreach my $c ($sheep->cities) { - # print Dumper($c->_data_hash); + + # 假期模式 + next if($c->status eq 'v'); - print("!") if ($c->status eq 'i'); + unless($c->status eq 'i') { + next if($members > 3); + } - printf("%d,%d,%d,%s of %s (%d),", $sheep->trader_score_secondary, $sheep->score, $sheep->army_score_main, $sheep->name, $sheep->ally, $members); + printf("%d %s %d,%d,%s of %s (%d),", + $sheep->trader_score_secondary, $c->status, $sheep->score, $sheep->army_score_main, $sheep->name, $sheep->ally, $members); my $island = Ikariam::Island->retrieve($c->island); printf("%s,%d,[%d,%d],http://s2.ikariam.tw/index.php?view=island&id=%d\n", $c->cityname, $c->citylevel,