This commit is contained in:
unknown
2012-08-10 20:36:18 +03:00
parent 13567e4954
commit 69cbf002b4
17 changed files with 29 additions and 17 deletions
+3 -1
View File
@@ -212,7 +212,7 @@ class Technology {
return $ownunit;
}
function getAllUnits($base,$InVillageOnly=False) {
function getAllUnits($base,$InVillageOnly=False,$mode=0) {
global $database;
$ownunit = $database->getUnit($base);
$ownunit['u99'] -= $ownunit['u99'];
@@ -226,6 +226,7 @@ class Technology {
$ownunit['hero'] += $enforce['hero'];
}
}
if($mode==0){
$prisoners = $database->getPrisoners($base);
if(!empty($prisoners)) {
foreach($prisoners as $prisoner){
@@ -240,6 +241,7 @@ class Technology {
$ownunit['hero'] += $prisoner['t11'];
}
}
}
if(!$InVillageOnly) {
$movement = $database->getVillageMovement($base);
if(!empty($movement)) {