mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-21 10:37:14 +00:00
fix: max units count shown as infinity
This commit is contained in:
@@ -187,10 +187,10 @@ class Technology {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function maxUnit($unit,$great=false) {
|
public function maxUnit($unit,$great=false) {
|
||||||
global $village,$$unit,$database;
|
|
||||||
|
|
||||||
$unit = "u".$unit;
|
$unit = "u".$unit;
|
||||||
$unitarray = $$unit;
|
|
||||||
|
global $village,$$unit,$database;
|
||||||
|
$unitarray = $$unit;
|
||||||
$res = $database->getVillage($village->wid);
|
$res = $database->getVillage($village->wid);
|
||||||
if ($res['wood'] > $res['maxstore']){$res['wood'] = $res['maxstore'];}
|
if ($res['wood'] > $res['maxstore']){$res['wood'] = $res['maxstore'];}
|
||||||
if ($res['clay'] > $res['maxstore']){$res['clay'] = $res['maxstore'];}
|
if ($res['clay'] > $res['maxstore']){$res['clay'] = $res['maxstore'];}
|
||||||
@@ -213,9 +213,9 @@ class Technology {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function maxUnitPlus($unit,$great=false) {
|
public function maxUnitPlus($unit,$great=false) {
|
||||||
global $village,$$unit,$database;
|
|
||||||
|
|
||||||
$unit = "u".$unit;
|
$unit = "u".$unit;
|
||||||
|
|
||||||
|
global $village,$$unit,$database;
|
||||||
$unitarray = $$unit;
|
$unitarray = $$unit;
|
||||||
$res = $database->getVillage($village->wid);
|
$res = $database->getVillage($village->wid);
|
||||||
$totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];
|
$totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];
|
||||||
|
|||||||
Reference in New Issue
Block a user