fix granery problem

This commit is contained in:
unknown
2012-07-30 23:03:50 +03:00
parent e73df07dc5
commit 98ecb39984
+2 -2
View File
@@ -402,7 +402,7 @@ class Automation {
$q = "UPDATE " . TB_PREFIX . "odata set maxstore = $maxstore, maxcrop = $maxcrop where wref = ".$getoasis['wref']."";
$database->query($q);
}
$q = "SELECT * FROM ".TB_PREFIX."odata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxstore";
$q = "SELECT * FROM ".TB_PREFIX."odata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxcrop";
$array = $database->query_return($q);
foreach($array as $getoasis) {
if($getoasis['wood'] > $getoasis['maxstore']){
@@ -475,7 +475,7 @@ class Automation {
$q = "UPDATE " . TB_PREFIX . "vdata set maxstore = $maxstore, maxcrop = $maxcrop where wref = ".$getvillage['wref']."";
$database->query($q);
}
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxstore";
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxcrop";
$array = $database->query_return($q);
foreach($array as $getvillage) {
if($getvillage['wood'] > $getvillage['maxstore']){