changeset 215:4aad04928f66

merged
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 04 Nov 2008 15:13:46 +0800
parents f6836ef11203 (diff) 550e20dd7573 (current diff)
children 785c89e5db32 1b7805535040
files
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agent.pl	Tue Nov 04 01:28:44 2008 +0800
+++ b/agent.pl	Tue Nov 04 15:13:46 2008 +0800
@@ -62,8 +62,8 @@
 
 sub is_safehouse_enough {
     my ($self, $city) = @_;
-    return 0 if(!defined($city->{building}->{safehouse}));
-    return (($city->{building}->{townHall} <= ($city->{building}->{safehouse} + 4)) ? 0 : 1);
+    return 0 if(!defined($city->{buildings}->{safehouse}));
+    return (($city->{buildings}->{townHall} <= ($city->{buildings}->{safehouse} + 4)) ? 0 : 1);
 }
 
 sub is_warehouse_enough {