General fixes

+Fixed a bug that didn't halved the catapults force when two buildings
were selected
This commit is contained in:
iopietro
2018-05-13 16:10:49 +02:00
parent bdd896573c
commit 26431b6cea
+1 -1
View File
@@ -810,7 +810,7 @@ class Automation {
// currently targeted building/field ID in the database (fdata, the fID field, e.g. f1, f2, f3...)
$tbid = (int) $catapultTarget;
$newLevel = $battle->CalculateNewBuildingLevel($battlepart['catapults']['moral'], $battlepart['catapults']['updown'], $tblevel, $battlepart['catapults']['realAttackers'], $data['t8']);
$newLevel = $battle->CalculateNewBuildingLevel($battlepart['catapults']['moral'], $battlepart['catapults']['updown'], $tblevel, $battlepart['catapults']['realAttackers'] / ($twoRowsCatapultSetup ? 2 : 1), $data['t8'] / ($twoRowsCatapultSetup ? 2 : 1));
//If that building was present in the building queue, we have to modify his level or remove it
$database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel]);