changeset 11:e21b8f303c6a

fixed the ally counting
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 08 Oct 2008 10:04:54 +0800
parents f590b5ea5e55
children 0aeb0fe59257
files sheep.pl
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sheep.pl	Wed Oct 08 09:55:43 2008 +0800
+++ b/sheep.pl	Wed Oct 08 10:04:54 2008 +0800
@@ -40,7 +40,6 @@
 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)));
 
-
 sub listSheeps
 {
     my @sheeps = @_;
@@ -55,7 +54,7 @@
 
         # 查聯盟數量
         my $members = 1;
-        unless ($sheep->status eq 'i') {
+        unless ($sheep->status eq 'i' || $sheep->allyId == '0') {
             $members = Ikariam::User->search(allyId => $sheep->allyId)->count();
             next if($members > 3);
         }