fix: WW villages created via Admin do not have any units

#392
This commit is contained in:
Martin Ambrus
2017-12-01 10:50:35 +01:00
parent 4db6ca52f9
commit c0c11050d9
2 changed files with 3 additions and 8 deletions
+1 -4
View File
@@ -27,7 +27,6 @@ include_once($autoprefix."GameEngine/Database.php");
$id = (int) $_POST['id'];
$amt = (int) $_POST['vill_amount'];
$addUnitsWrefs = [];
for($i=1;$i<=$amt;$i++) {
@@ -41,7 +40,7 @@ $addUnitsWrefs = [];
mysqli_query($GLOBALS["link"], $q);
$pop = $automation->recountPop($wid);
$cp = $automation->recountPop($wid);
$addUnitsWrefs[] = $wid;
$database->addUnits($wid);
$database->addTech($wid);
$database->addABTech($wid);
$speed = NATARS_UNITS;
@@ -51,8 +50,6 @@ $addUnitsWrefs = [];
$database->addArtefact($wid, 3, 11, 1, PLAN, $desc, '', 'type1.gif');
}
$database->addUnits($addUnitsWrefs);
$myFile = "../../../Templates/text.tpl";
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: templates/text.tpl");
$text = file_get_contents("../../../Templates/text_format.tpl");