From b7e9c4edcbad70c489daeb55edb7eab0ad1588bc Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Mon, 20 Nov 2017 10:15:54 +0100 Subject: [PATCH] fix: max units count shown as infinity --- GameEngine/Technology.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php index 45589430..ae11ccdb 100755 --- a/GameEngine/Technology.php +++ b/GameEngine/Technology.php @@ -187,10 +187,10 @@ class Technology { } public function maxUnit($unit,$great=false) { - global $village,$$unit,$database; - $unit = "u".$unit; - $unitarray = $$unit; + + global $village,$$unit,$database; + $unitarray = $$unit; $res = $database->getVillage($village->wid); if ($res['wood'] > $res['maxstore']){$res['wood'] = $res['maxstore'];} if ($res['clay'] > $res['maxstore']){$res['clay'] = $res['maxstore'];} @@ -213,9 +213,9 @@ class Technology { } public function maxUnitPlus($unit,$great=false) { - global $village,$$unit,$database; - $unit = "u".$unit; + + global $village,$$unit,$database; $unitarray = $$unit; $res = $database->getVillage($village->wid); $totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];