diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 549d7045..2b6193c6 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -3317,7 +3317,7 @@ class MYSQLi_DB implements IDbConnection { crop = IF(crop $sign $crop < 0, 0, IF(crop $sign $crop > maxcrop, maxcrop, crop $sign $crop)) WHERE wref = " . $vid ; - + return mysqli_query( $this->dblink, $q); } diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php index 223cc101..7b10bed4 100755 --- a/GameEngine/Technology.php +++ b/GameEngine/Technology.php @@ -191,7 +191,7 @@ class Technology { global $village,$$unit,$database; $unitarray = $$unit; - $res = $database->getVillage($village->wid); + $res = $database->getVillage($village->wid, 0, false); if ($res['wood'] > $res['maxstore']){$res['wood'] = $res['maxstore'];} if ($res['clay'] > $res['maxstore']){$res['clay'] = $res['maxstore'];} if ($res['iron'] > $res['maxstore']){$res['iron'] = $res['maxstore'];} diff --git a/Templates/Build/22_2.tpl b/Templates/Build/22_2.tpl index c40ae2fc..ed850bfa 100644 --- a/Templates/Build/22_2.tpl +++ b/Templates/Build/22_2.tpl @@ -20,7 +20,6 @@ for($i=12;$i<=19;$i++) { //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'r'.$i}['wood'] + ${'r'.$i}['clay'] + ${'r'.$i}['iron'] + ${'r'.$i}['crop']); - echo "Total required is $total_required and total available is " . $village->atotal; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) { echo "|\"NPC"; }